Permalink
Browse files

Issue #16 Fixed

* Pressing Escape should work in Chrome, Opera, Safari, Firefox, and IE now
  • Loading branch information...
Jason Butz
Jason Butz committed Jan 14, 2013
1 parent 9e5710a commit c2f048eb04b6a101bb8e80d77e28f5fd6f101efd
@@ -131,14 +131,14 @@
var that = this;
if (this.isShown && this.options.keyboard)
{
- this.$element.on('keyup.dismiss.lightbox', function ( e )
+ this.$element.on('keypress.dismiss.lightbox, keyup.dismiss.lightbox', function ( e )
{
e.which == 27 && that.hide();
});
}
else if (!this.isShown)
{
- this.$element.off('keyup.dismiss.lightbox');
+ this.$element.off('keypress.dismiss.lightbox, keyup.dismiss.lightbox');
}
},
hideWithTransition: function ()

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.
View
@@ -115,14 +115,14 @@
var that = this;
if (this.isShown && this.options.keyboard)
{
- this.$element.on('keyup.dismiss.lightbox', function ( e )
+ this.$element.on('keypress.dismiss.lightbox, keyup.dismiss.lightbox', function ( e )
{
e.which == 27 && that.hide();
});
}
else if (!this.isShown)
{
- this.$element.off('keyup.dismiss.lightbox');
+ this.$element.off('keypress.dismiss.lightbox, keyup.dismiss.lightbox');
}
},
hideWithTransition: function ()

0 comments on commit c2f048e

Please sign in to comment.