From fc6effae51769c5bd7dfe0d1720606dd42c5f6e9 Mon Sep 17 00:00:00 2001 From: Jacob Thornton Date: Sun, 18 Sep 2011 21:13:56 -0700 Subject: [PATCH] listen to document for ie --- js/bootstrap-modal.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/js/bootstrap-modal.js b/js/bootstrap-modal.js index 4201d843c2..2335c39d94 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') } }