aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--js/bootstrap-modal.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/js/bootstrap-modal.js b/js/bootstrap-modal.js
index 4201d843c..2335c39d9 100644
--- a/js/bootstrap-modal.js
+++ b/js/bootstrap-modal.js
@@ -172,13 +172,13 @@
function escape() {
var that = this
if ( this.isShown && this.settings.keyboard ) {
- $(window).bind('keyup.modal', function ( e ) {
+ $(document).bind('keyup.modal', function ( e ) {
if ( e.which == 27 ) {
that.hide()
}
})
} else if ( !this.isShown ) {
- $(window).unbind('keyup.modal')
+ $(document).unbind('keyup.modal')
}
}