diff options
author | Hsieh Chin Fan <pham@topo.tw> | 2024-10-28 12:23:25 +0800 |
---|---|---|
committer | Hsieh Chin Fan <pham@topo.tw> | 2024-10-28 19:44:05 +0800 |
commit | 6d8400e11ac5ebb05b43a12367384e686f834d7c (patch) | |
tree | b82e4d38d71921943dcb9882ee4333d0d0cb94c9 /src/editor.mjs | |
parent | 65680175fc04e71b362458745727974af73f711c (diff) |
feat: add menu-item for edit map without editor
Diffstat (limited to 'src/editor.mjs')
-rw-r--r-- | src/editor.mjs | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/editor.mjs b/src/editor.mjs index b023d1a..f7b9c65 100644 --- a/src/editor.mjs +++ b/src/editor.mjs | |||
@@ -901,6 +901,7 @@ cm.on('keydown', (_, e) => { | |||
901 | }) | 901 | }) |
902 | 902 | ||
903 | document.onkeydown = e => { | 903 | document.onkeydown = e => { |
904 | if (document.activeElement.matches('textarea')) return null | ||
904 | if (e.altKey && e.ctrlKey && e.key === 'm') { | 905 | if (e.altKey && e.ctrlKey && e.key === 'm') { |
905 | toggleEditing() | 906 | toggleEditing() |
906 | e.preventDefault() | 907 | e.preventDefault() |