mirror of
https://github.com/twbs/bootstrap.git
synced 2025-08-10 15:44:51 +02:00
Unify offcanvas
keydown
event logic with modal
(#38025)
This commit is contained in:
@@ -208,7 +208,6 @@ class Modal extends BaseComponent {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (this._config.keyboard) {
|
if (this._config.keyboard) {
|
||||||
event.preventDefault()
|
|
||||||
this.hide()
|
this.hide()
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
@@ -198,12 +198,12 @@ class Offcanvas extends BaseComponent {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!this._config.keyboard) {
|
if (this._config.keyboard) {
|
||||||
EventHandler.trigger(this._element, EVENT_HIDE_PREVENTED)
|
this.hide()
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
this.hide()
|
EventHandler.trigger(this._element, EVENT_HIDE_PREVENTED)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user