From 9caa0407c2f7ec22ddf86c80efbfe9cfc6ae65da Mon Sep 17 00:00:00 2001 From: Jeremy Thomas Date: Tue, 14 Mar 2017 22:43:36 +0000 Subject: [PATCH] Add escape key for modals --- CHANGELOG.md | 1 + docs/javascript/bulma.js | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 23356226..edd122e9 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 457a4c1f..b09722d4 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() {