Skip to content

An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作

:art: https://github.com/siyuan-note/siyuan/issues/7658#issuecomment-1471165136

Vanessacb85bb8080e7
diff --git a/app/src/protyle/wysiwyg/keydown.ts b/app/src/protyle/wysiwyg/keydown.ts
index 26dde8b60b..66f98bbaea 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"));