mirror of
https://github.com/twbs/bootstrap.git
synced 2025-08-18 11:21:23 +02:00
Merge pull request #22398 from patrickhlauke/v4-dev-modal-macos-fullscreen-esc-fix
Prevent default for ESC in modal.js
This commit is contained in:
@@ -289,6 +289,7 @@ const Modal = (($) => {
|
|||||||
if (this._isShown && this._config.keyboard) {
|
if (this._isShown && this._config.keyboard) {
|
||||||
$(this._element).on(Event.KEYDOWN_DISMISS, (event) => {
|
$(this._element).on(Event.KEYDOWN_DISMISS, (event) => {
|
||||||
if (event.which === ESCAPE_KEYCODE) {
|
if (event.which === ESCAPE_KEYCODE) {
|
||||||
|
event.preventDefault()
|
||||||
this.hide()
|
this.hide()
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
Reference in New Issue
Block a user