1
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-08-08 22:56:46 +02:00

Unify offcanvas keydown event logic with modal (#38025)

This commit is contained in:
Roni Diwan
2023-02-11 10:35:10 +02:00
committed by GitHub
parent 9f5dca0777
commit 7432ebc665
2 changed files with 3 additions and 4 deletions

View File

@@ -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)
})
}