From cb85bb8080e7f4c76ce434fd50b7634ee24835bd Mon Sep 17 00:00:00 2001 From: Vanessa Date: Thu, 16 Mar 2023 10:04:53 +0800 Subject: [PATCH] :art: https://github.com/siyuan-note/siyuan/issues/7658#issuecomment-1471165136 --- app/src/protyle/wysiwyg/keydown.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/protyle/wysiwyg/keydown.ts b/app/src/protyle/wysiwyg/keydown.ts index 26dde8b60..66f98bbae 100644 --- a/app/src/protyle/wysiwyg/keydown.ts +++ b/app/src/protyle/wysiwyg/keydown.ts @@ -1292,7 +1292,7 @@ export const keydown = (protyle: IProtyle, editorElement: HTMLElement) => { return; } - if (!nodeElement.classList.contains("code-block")) { + if (!nodeElement.classList.contains("code-block") && !event.repeat) { const findToolbar = protyle.options.toolbar.find((menuItem: IMenuItem) => { if (!menuItem.hotkey) { return false; @@ -1497,7 +1497,7 @@ export const keydown = (protyle: IProtyle, editorElement: HTMLElement) => { return; } - if (matchHotKey(window.siyuan.config.keymap.editor.general.duplicate.custom, event)) { + if (!event.repeat && matchHotKey(window.siyuan.config.keymap.editor.general.duplicate.custom, event)) { event.preventDefault(); event.stopPropagation(); let selectsElement: HTMLElement[] = Array.from(protyle.wysiwyg.element.querySelectorAll(".protyle-wysiwyg--select"));