markers - statues

This commit is contained in:
Azgaar 2021-09-17 22:32:48 +03:00 committed by Dranorter
parent ce346d11cb
commit 4482be13f6
2 changed files with 39 additions and 0 deletions

View file

@ -16,6 +16,7 @@ function handleKeyup(event) {
const {tagName, contentEditable} = document.activeElement;
if (["INPUT", "SELECT", "TEXTAREA"].includes(tagName)) return; // don't trigger if user inputs text
if (tagName === "DIV" && contentEditable === "true") return; // don't trigger if user inputs a text
if (document.getSelection().toString()) return; // don't trigger if user selects text
event.stopPropagation();
const {ctrlKey, metaKey, shiftKey, altKey} = event;