diff options
Diffstat (limited to 'js/src')
| -rw-r--r-- | js/src/modal.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/js/src/modal.js b/js/src/modal.js index c97722538..a39597b3a 100644 --- a/js/src/modal.js +++ b/js/src/modal.js @@ -223,9 +223,9 @@ class Modal extends BaseComponent { }) EventHandler.on(this._element, EVENT_MOUSEDOWN_DISMISS, event => { + // a bad trick to segregate clicks that may start inside dialog but end outside, and avoid listen to scrollbar clicks EventHandler.one(this._element, EVENT_CLICK_DISMISS, event2 => { - // a bad trick to segregate clicks that may start inside dialog but end outside, and avoid listen to scrollbar clicks - if (this._dialog.contains(event.target) || this._dialog.contains(event2.target)) { + if (this._element !== event.target || this._element !== event2.target) { return } |
