Skip to content

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

:bug: Prevent flashcard shortcuts while editing document titles https://github.com/siyuan-note/siyuan/issues/18736

Daniel9ce5fe5d878b
diff --git a/app/src/boot/globalEvent/commonHotkey.ts b/app/src/boot/globalEvent/commonHotkey.ts
index 95889238f5..14cfaafa88 100644
--- a/app/src/boot/globalEvent/commonHotkey.ts
+++ b/app/src/boot/globalEvent/commonHotkey.ts
@@ -167,6 +167,7 @@ export const filterHotkey = (event: KeyboardEvent, app: App) => {
// 点击最近的文档列表会 dispatch keydown 的 Enter https://github.com/siyuan-note/siyuan/issues/12967
if (event.isTrusted && isNotCtrl(event) && !event.shiftKey && !event.altKey &&
!["INPUT", "TEXTAREA"].includes(target.tagName) &&
+ !target.isContentEditable &&
["0", "1", "2", "3", "4", "j", "k", "l", ";", "s", " ", "p", "enter", "a", "s", "d", "f", "q", "x"].includes(event.key.toLowerCase())) {
let cardElement: Element;
window.siyuan.dialogs.find(item => {