aboutsummaryrefslogtreecommitdiff
path: root/js/modal.js
diff options
context:
space:
mode:
authorHeinrich Fenkart <[email protected]>2014-07-01 05:50:31 +0200
committerHeinrich Fenkart <[email protected]>2014-07-01 05:50:31 +0200
commit91f329e4488c667c04ea0f3ccc8dc11aaa7124ef (patch)
tree5ecf1ba79ad1d6137bfbe4075df3a692df8515a8 /js/modal.js
parent8deab3a95d24afa795c428572b7bfadbc7fb9ac5 (diff)
downloadbootstrap-91f329e4488c667c04ea0f3ccc8dc11aaa7124ef.tar.xz
bootstrap-91f329e4488c667c04ea0f3ccc8dc11aaa7124ef.zip
Only close modal if escape was hit with keydown; fixes #13929
Diffstat (limited to 'js/modal.js')
-rw-r--r--js/modal.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/js/modal.js b/js/modal.js
index 29eedf117..92eff470a 100644
--- a/js/modal.js
+++ b/js/modal.js
@@ -135,11 +135,11 @@
Modal.prototype.escape = function () {
if (this.isShown && this.options.keyboard) {
- this.$element.on('keyup.dismiss.bs.modal', $.proxy(function (e) {
+ this.$element.on('keydown.dismiss.bs.modal', $.proxy(function (e) {
e.which == 27 && this.hide()
}, this))
} else if (!this.isShown) {
- this.$element.off('keyup.dismiss.bs.modal')
+ this.$element.off('keydown.dismiss.bs.modal')
}
}