diff options
Diffstat (limited to 'ext/bg')
-rw-r--r-- | ext/bg/js/settings/popup-elements.js | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/ext/bg/js/settings/popup-elements.js b/ext/bg/js/settings/popup-elements.js index 4b4a0e17..decb39e1 100644 --- a/ext/bg/js/settings/popup-elements.js +++ b/ext/bg/js/settings/popup-elements.js @@ -117,9 +117,11 @@ class Modal extends PopupElement { prepare() { const node = this._node; - node.addEventListener('mousedown', this._onModalContainerMouseDown.bind(this), false); - node.addEventListener('mouseup', this._onModalContainerMouseUp.bind(this), false); - node.addEventListener('click', this._onModalContainerClick.bind(this), false); + let dimmerNode = node.querySelector('.modal-content-dimmer'); + if (dimmerNode === null) { dimmerNode = node; } + dimmerNode.addEventListener('mousedown', this._onModalContainerMouseDown.bind(this), false); + dimmerNode.addEventListener('mouseup', this._onModalContainerMouseUp.bind(this), false); + dimmerNode.addEventListener('click', this._onModalContainerClick.bind(this), false); } // Private |