mirror of
https://github.com/Hopiu/bootstrap.git
synced 2026-04-05 13:50:58 +00:00
listen to document for ie
This commit is contained in:
parent
ac8001190a
commit
fc6effae51
1 changed files with 2 additions and 2 deletions
4
js/bootstrap-modal.js
vendored
4
js/bootstrap-modal.js
vendored
|
|
@ -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')
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue