From: Jacob Thornton Date: Mon, 19 Sep 2011 04:13:56 +0000 (-0700) Subject: listen to document for ie X-Git-Tag: v1.4.0~71 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=fc6effae51769c5bd7dfe0d1720606dd42c5f6e9;p=thirdparty%2Fbootstrap.git listen to document for ie --- 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') } }