]> git.ipfire.org Git - thirdparty/bulma.git/commitdiff
Add escape key for modals
authorJeremy Thomas <bbxdesign@gmail.com>
Tue, 14 Mar 2017 22:43:36 +0000 (22:43 +0000)
committerJeremy Thomas <bbxdesign@gmail.com>
Wed, 15 Mar 2017 22:14:42 +0000 (22:14 +0000)
CHANGELOG.md
docs/javascript/bulma.js

index 2335622625c448bb60fe9e1f19b4c281c78d1425..edd122e973e075e26616e6c401af0efc9fa6cd53 100644 (file)
@@ -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
 
index 457a4c1f9b986d49039a09bb1652839710ed839b..b09722d48d68ffd0ebae2269a0595c3f257dd495 100644 (file)
@@ -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() {