diff options
author | Hanzei <hanzei@mailbox.org> | 2018-06-27 12:23:07 +0300 |
---|---|---|
committer | Hanzei <hanzei@mailbox.org> | 2018-06-27 12:23:07 +0300 |
commit | ae90b403882f9889f75c88b6ed27ae5eaeaea753 (patch) | |
tree | 4a1fb02667cd8e42a51a6ead95ced832bda66f6c /layouts/partials/projects.html | |
parent | db4f7e5d7a12f953f795169fc340b920f784a572 (diff) |
Close project modals when pressing esc
Diffstat (limited to 'layouts/partials/projects.html')
-rw-r--r-- | layouts/partials/projects.html | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/layouts/partials/projects.html b/layouts/partials/projects.html index 98ebc71..8e417b2 100644 --- a/layouts/partials/projects.html +++ b/layouts/partials/projects.html @@ -68,6 +68,11 @@ $('#close-{{ $index }}').click(function () { $('#modal-{{ $index }}').removeClass('is-active'); }); + $(document).keypress(function(e) { + if(e.which == 0) { + $('#modal-{{ $index }}').removeClass('is-active'); + } + }); </script> {{ end }} {{ end }} {{ partial "top-icon.html" . }} |