Skip to content

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

:art: fix https://github.com/siyuan-note/siyuan/issues/11846

Vanessa4bffce930f6a
diff --git a/app/src/protyle/hint/index.ts b/app/src/protyle/hint/index.ts
index d55fe72748..521497baeb 100644
--- a/app/src/protyle/hint/index.ts
+++ b/app/src/protyle/hint/index.ts
@@ -955,8 +955,7 @@ ${genHintItemHTML(item)}
}
if (event.key === "ArrowLeft" || event.key === "ArrowRight") {
hideElements(["hint"], protyle);
- event.preventDefault();
- event.stopPropagation();
+ // 不需要 preventDefault https://github.com/siyuan-note/siyuan/issues/11846
return true;
}
return false;
diff --git a/app/src/protyle/wysiwyg/keydown.ts b/app/src/protyle/wysiwyg/keydown.ts
index aa2e1c6966..1cf5470715 100644
--- a/app/src/protyle/wysiwyg/keydown.ts
+++ b/app/src/protyle/wysiwyg/keydown.ts
@@ -553,8 +553,6 @@ export const keydown = (protyle: IProtyle, editorElement: HTMLElement) => {
if (!event.altKey && !event.shiftKey &&
((event.key.indexOf("Arrow") > -1 && isNotCtrl(event)) || event.key === "Enter") &&
!protyle.hint.element.classList.contains("fn__none") && protyle.hint.select(event, protyle)) {
- event.stopPropagation();
- event.preventDefault();
return;
}
if (matchHotKey("⌘/", event)) {