aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortoasted-nutbread <toasted-nutbread@users.noreply.github.com>2020-10-30 22:20:50 -0400
committerGitHub <noreply@github.com>2020-10-30 22:20:50 -0400
commitf5d6573bec6ee0133e260d1a7825d91ba5d6c9e7 (patch)
treea9f37f8560951314d56d5cb5e0b60abbceda35f6
parent327d7b1f26d8553809292e159b97d44bc77b7b8e (diff)
Add supoprt for modal dimmer element (#971)
-rw-r--r--ext/bg/js/settings/popup-elements.js8
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