0
0
mirror of https://github.com/twbs/bootstrap.git synced 2024-11-30 12:24:19 +01:00

listen to document for ie

This commit is contained in:
Jacob Thornton 2011-09-18 21:13:56 -07:00
parent ac8001190a
commit fc6effae51

View File

@ -172,13 +172,13 @@
function escape() { function escape() {
var that = this var that = this
if ( this.isShown && this.settings.keyboard ) { if ( this.isShown && this.settings.keyboard ) {
$(window).bind('keyup.modal', function ( e ) { $(document).bind('keyup.modal', function ( e ) {
if ( e.which == 27 ) { if ( e.which == 27 ) {
that.hide() that.hide()
} }
}) })
} else if ( !this.isShown ) { } else if ( !this.isShown ) {
$(window).unbind('keyup.modal') $(document).unbind('keyup.modal')
} }
} }