0
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-03-13 13:29:25 +01: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:
Patrick H. Lauke 2017-04-09 22:00:51 +01:00 committed by GitHub
commit 6702107131

View File

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