aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/editor.mjs
diff options
context:
space:
mode:
authorHsieh Chin Fan <pham@topo.tw>2024-09-24 12:04:45 +0800
committerHsieh Chin Fan <pham@topo.tw>2024-09-24 12:17:22 +0800
commit9c3cbff5f1026697df0b209d6add736e7d4d346a (patch)
tree5012a9b3004c7757180458e7ece6700dc10848ea /src/editor.mjs
parent3e441088ad9f5a98f0acda506bd03f7d1631cb0c (diff)
feat: add util "removeBlockFocus"
Diffstat (limited to 'src/editor.mjs')
-rw-r--r--src/editor.mjs4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/editor.mjs b/src/editor.mjs
index f4fadb4..35b1949 100644
--- a/src/editor.mjs
+++ b/src/editor.mjs
@@ -570,6 +570,10 @@ document.onkeydown = (e) => {
570 e.preventDefault() 570 e.preventDefault()
571 dumbymap.utils.focusNextBlock(true) 571 dumbymap.utils.focusNextBlock(true)
572 } 572 }
573 if (e.key === 'Escape') {
574 e.preventDefault()
575 dumbymap.utils.removeBlockFocus()
576 }
573 } 577 }
574} 578}
575 579