fix: remove click eventlistener when pref panel is hidden

This commit is contained in:
alistair3149 2021-05-18 12:27:10 -04:00
parent 5c57415a86
commit b32151c99a
No known key found for this signature in database
GPG key ID: 94D081060FD3DD9C

View file

@ -193,7 +193,7 @@ function togglePanel() {
toggle.setAttribute( 'aria-expanded', false );
form.removeEventListener( 'input', setPref );
resetButton.removeEventListener( 'click', resetPref );
window.addEventListener( 'click', dismissOnClickOutside );
window.removeEventListener( 'click', dismissOnClickOutside );
window.removeEventListener( 'keydown', dismissOnEscape );
}
}