Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/twbs/bootstrap.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick H. Lauke <redux@splintered.co.uk>2017-04-09 18:19:20 +0300
committerPatrick H. Lauke <redux@splintered.co.uk>2017-04-09 18:19:20 +0300
commit2626eba5f1218dc79064598e2f43a30116bd5742 (patch)
tree8cc02aee663ccf69d055c34f3cfa9fb487a9f2c3 /js/src/modal.js
parent0719ab18887c5b7415b9042b3ac60008de593f9f (diff)
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.
Diffstat (limited to 'js/src/modal.js')
-rw-r--r--js/src/modal.js1
1 files changed, 1 insertions, 0 deletions
diff --git a/js/src/modal.js b/js/src/modal.js
index 779b9a402f..02d463945b 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()
}
})