From: Jeremy Thomas Date: Tue, 14 Mar 2017 22:43:36 +0000 (+0000) Subject: Add escape key for modals X-Git-Tag: 0.4.0~4 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9caa0407c2f7ec22ddf86c80efbfe9cfc6ae65da;p=thirdparty%2Fbulma.git Add escape key for modals --- diff --git a/CHANGELOG.md b/CHANGELOG.md index 233562262..edd122e97 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,7 @@ * Split icon container dimensions and icon size * Fix delete button by using pixels instead of (r)em * Fix level on mobile +* Add new `.is-spaced` modifer for titles and subtitles ## 0.3.2 diff --git a/docs/javascript/bulma.js b/docs/javascript/bulma.js index 457a4c1f9..b09722d48 100644 --- a/docs/javascript/bulma.js +++ b/docs/javascript/bulma.js @@ -24,6 +24,13 @@ jQuery(document).ready(function ($) { $('#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'); $highlights.each(function() {