mirror of
https://github.com/twbs/bootstrap.git
synced 2024-12-01 13:24:25 +01:00
Unify offcanvas
keydown
event logic with modal
(#38025)
This commit is contained in:
parent
9f5dca0777
commit
7432ebc665
@ -208,7 +208,6 @@ class Modal extends BaseComponent {
|
||||
}
|
||||
|
||||
if (this._config.keyboard) {
|
||||
event.preventDefault()
|
||||
this.hide()
|
||||
return
|
||||
}
|
||||
|
@ -198,12 +198,12 @@ class Offcanvas extends BaseComponent {
|
||||
return
|
||||
}
|
||||
|
||||
if (!this._config.keyboard) {
|
||||
EventHandler.trigger(this._element, EVENT_HIDE_PREVENTED)
|
||||
if (this._config.keyboard) {
|
||||
this.hide()
|
||||
return
|
||||
}
|
||||
|
||||
this.hide()
|
||||
EventHandler.trigger(this._element, EVENT_HIDE_PREVENTED)
|
||||
})
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user