We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fb483e3 commit 51b1cf0Copy full SHA for 51b1cf0
resources/assets/js/facetwp/choices.js
@@ -31,11 +31,17 @@ $document.on( 'facetwp-loaded', () => {
31
wrapper.prepend( input );
32
33
// Better visual feedback (automatically check when clicked.)
34
- wrapper.addEventListener( 'click', () => {
+ wrapper.addEventListener( 'click', ( e ) => {
35
+ // Don't toggle if already disabled.
36
if ( hasClass( wrapper, 'disabled' ) ) {
37
return;
38
}
39
40
+ // Don't toggle if clicking the "[+]" or "[-]".
41
+ if ( e.target.className === 'facetwp-expand' ) {
42
+ return;
43
+ }
44
+
45
const foundInput = wrapper.querySelector( 'input' );
46
47
foundInput.checked = ! foundInput.checked;
0 commit comments