mirror of
https://github.com/Hopiu/bootstrap.git
synced 2026-04-17 10:50:58 +00:00
Prevent default for ESC in modal.js
ESC can be used to close modals, but on OS X/macOS this also jumps out of full-screen mode. `preventDefault` suppresses this.
This commit is contained in:
parent
0719ab1888
commit
2626eba5f1
1 changed files with 1 additions and 0 deletions
|
|
@ -289,6 +289,7 @@ const Modal = (($) => {
|
|||
if (this._isShown && this._config.keyboard) {
|
||||
$(this._element).on(Event.KEYDOWN_DISMISS, (event) => {
|
||||
if (event.which === ESCAPE_KEYCODE) {
|
||||
event.preventDefault()
|
||||
this.hide()
|
||||
}
|
||||
})
|
||||
|
|
|
|||
Loading…
Reference in a new issue