mirror of
https://github.com/tchartron/blow
synced 2024-11-27 14:50:56 +00:00
update
This commit is contained in:
parent
cdc8c9c8b0
commit
93b56388a9
1 changed files with 1 additions and 1 deletions
|
@ -24,7 +24,6 @@ document.addEventListener("DOMContentLoaded", function() {
|
|||
// }
|
||||
|
||||
document.onkeydown = function(evt) {
|
||||
evt.preventDefault()
|
||||
evt = evt || window.event
|
||||
let isEscape = false
|
||||
let isCmdK = false
|
||||
|
@ -35,6 +34,7 @@ document.addEventListener("DOMContentLoaded", function() {
|
|||
isCmdK = (evt.keyCode === 75 && evt.metaKey)
|
||||
isEscape = (evt.keyCode === 27)
|
||||
}
|
||||
if (isCmdK) { evt.preventDefault() }
|
||||
if ((isEscape && document.body.classList.contains('modal-active')) || isCmdK) {
|
||||
toggleModal();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue