diff options
| author | Patrick H. Lauke <[email protected]> | 2017-04-09 16:19:20 +0100 |
|---|---|---|
| committer | Patrick H. Lauke <[email protected]> | 2017-04-09 16:19:20 +0100 |
| commit | 2626eba5f1218dc79064598e2f43a30116bd5742 (patch) | |
| tree | 8cc02aee663ccf69d055c34f3cfa9fb487a9f2c3 | |
| parent | 0719ab18887c5b7415b9042b3ac60008de593f9f (diff) | |
| download | bootstrap-2626eba5f1218dc79064598e2f43a30116bd5742.tar.xz bootstrap-2626eba5f1218dc79064598e2f43a30116bd5742.zip | |
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.
| -rw-r--r-- | js/src/modal.js | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/js/src/modal.js b/js/src/modal.js index 779b9a402..02d463945 100644 --- a/js/src/modal.js +++ b/js/src/modal.js @@ -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() } }) |
