mirror of
https://github.com/twbs/bootstrap.git
synced 2025-08-26 06:44:35 +02:00
chore(update): bump to 4.1.3
This commit is contained in:
@@ -119,7 +119,7 @@ class Modal {
|
||||
relatedTarget
|
||||
})
|
||||
|
||||
if (this._isShown || showEvent.isDefaultPrevented()) {
|
||||
if (this._isShown || showEvent.defaultPrevented) {
|
||||
return
|
||||
}
|
||||
|
||||
@@ -161,7 +161,7 @@ class Modal {
|
||||
|
||||
const hideEvent = EventHandler.trigger(this._element, Event.HIDE)
|
||||
|
||||
if (!this._isShown || hideEvent.isDefaultPrevented()) {
|
||||
if (!this._isShown || hideEvent.defaultPrevented) {
|
||||
return
|
||||
}
|
||||
|
||||
@@ -282,16 +282,14 @@ class Modal {
|
||||
}
|
||||
|
||||
_enforceFocus() {
|
||||
if (this._isShown && this._config.keyboard) {
|
||||
EventHandler.on(this._element, Event.KEYDOWN_DISMISS, (event) => {
|
||||
if (event.which === ESCAPE_KEYCODE) {
|
||||
event.preventDefault()
|
||||
this.hide()
|
||||
}
|
||||
})
|
||||
} else if (!this._isShown) {
|
||||
EventHandler.off(this._element, Event.KEYDOWN_DISMISS)
|
||||
}
|
||||
EventHandler.off(document, Event.FOCUSIN) // guard against infinite focus loop
|
||||
EventHandler.on(document, Event.FOCUSIN, (event) => {
|
||||
if (document !== event.target &&
|
||||
this._element !== event.target &&
|
||||
!this._element.contains(event.target)) {
|
||||
this._element.focus()
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
_setEscapeEvent() {
|
||||
@@ -383,7 +381,7 @@ class Modal {
|
||||
const backdropTransitionDuration = Util.getTransitionDurationFromElement(this._backdrop)
|
||||
|
||||
EventHandler.one(this._backdrop, Util.TRANSITION_END, callback)
|
||||
Util.emulateTransitionEnd(backdropTransitionDuration)
|
||||
Util.emulateTransitionEnd(this._backdrop, backdropTransitionDuration)
|
||||
} else if (!this._isShown && this._backdrop) {
|
||||
this._backdrop.classList.remove(ClassName.SHOW)
|
||||
|
||||
|
Reference in New Issue
Block a user