]> git.ipfire.org Git - thirdparty/bootstrap.git/commitdiff
listen to document for ie
authorJacob Thornton <jacobthornton@gmail.com>
Mon, 19 Sep 2011 04:13:56 +0000 (21:13 -0700)
committerJacob Thornton <jacobthornton@gmail.com>
Mon, 19 Sep 2011 04:13:56 +0000 (21:13 -0700)
js/bootstrap-modal.js

index 4201d843c24a672dcfb3bb75201bd1ec62cc46b8..2335c39d94bb41c83a99f702dcb3bce6aac1e719 100644 (file)
   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')
     }
   }