mirror of
https://github.com/tenrok/bootstrap.git
synced 2026-05-30 15:24:08 +03:00
Fix modal event listeners (#37128)
* Fix modal event listeners (#37126) Co-authored-by: GeoSot <geo.sotis@gmail.com>
This commit is contained in:
+2
-2
@@ -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
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user