Skip to content

Commit

Permalink
fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
GeoSot committed Sep 7, 2022
1 parent 7f39709 commit 3d0c07b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions js/src/modal.js
Expand Up @@ -31,7 +31,7 @@ const EVENT_SHOW = `show${EVENT_KEY}`
const EVENT_SHOWN = `shown${EVENT_KEY}`
const EVENT_RESIZE = `resize${EVENT_KEY}`
const EVENT_CLICK_DISMISS = `click.dismiss${EVENT_KEY}`
const EVENT_MOUSDOWN_DISMISS = `mousedown.dismiss${EVENT_KEY}`
const EVENT_MOUSEDOWN_DISMISS = `mousedown.dismiss${EVENT_KEY}`
const EVENT_KEYDOWN_DISMISS = `keydown.dismiss${EVENT_KEY}`
const EVENT_CLICK_DATA_API = `click${EVENT_KEY}${DATA_API_KEY}`

Expand Down Expand Up @@ -222,7 +222,7 @@ class Modal extends BaseComponent {
}
})

EventHandler.on(this._element, EVENT_MOUSDOWN_DISMISS, event => {
EventHandler.on(this._element, EVENT_MOUSEDOWN_DISMISS, event => {
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)) {
Expand Down

0 comments on commit 3d0c07b

Please sign in to comment.