mirror of
https://github.com/twbs/bootstrap.git
synced 2024-11-29 11:24:18 +01: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
@ -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 New Issue
Block a user