Add escape key for modals

This commit is contained in:
Jeremy Thomas 2017-03-14 22:43:36 +00:00
parent 1dc6ef2c76
commit 9caa0407c2
2 changed files with 8 additions and 0 deletions

View File

@ -12,6 +12,7 @@
* Split icon container dimensions and icon size * Split icon container dimensions and icon size
* Fix delete button by using pixels instead of (r)em * Fix delete button by using pixels instead of (r)em
* Fix level on mobile * Fix level on mobile
* Add new `.is-spaced` modifer for titles and subtitles
## 0.3.2 ## 0.3.2

View File

@ -24,6 +24,13 @@ jQuery(document).ready(function ($) {
$('#modal-ter').removeClass('is-active'); $('#modal-ter').removeClass('is-active');
}); });
$(document).on('keyup',function(e) {
if (e.keyCode == 27) {
$('html').removeClass('is-clipped');
$('.modal').removeClass('is-active');
}
});
var $highlights = $('.highlight'); var $highlights = $('.highlight');
$highlights.each(function() { $highlights.each(function() {