Commit fc6effae authored by Jacob Thornton's avatar Jacob Thornton

listen to document for ie

parent ac800119
...@@ -172,13 +172,13 @@ ...@@ -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')
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment