Skip to content

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

:bug: fix https://github.com/siyuan-note/siyuan/issues/7868

Vanessac0b30d454346
diff --git a/app/src/util/globalShortcut.ts b/app/src/util/globalShortcut.ts
index 69f5e245d5..9c0dcb98f0 100644
--- a/app/src/util/globalShortcut.ts
+++ b/app/src/util/globalShortcut.ts
@@ -1080,7 +1080,8 @@ const editKeydown = (event: KeyboardEvent) => {
return true;
}
const target = event.target as HTMLElement;
- if (target.tagName === "INPUT" || target.tagName === "TEXTAREA" || hasClosestByAttribute(target, "contenteditable", null)) {
+ if (target.tagName === "INPUT" || target.tagName === "TEXTAREA" ||
+ hasClosestByAttribute(target, "contenteditable", null)) {
return false;
}
if (matchHotKey(window.siyuan.config.keymap.editor.general.refresh.custom, event)) {
@@ -1216,7 +1217,9 @@ const fileTreeKeydown = (event: KeyboardEvent) => {
return true;
}
const target = event.target as HTMLElement;
- if (target.tagName === "INPUT" || target.tagName === "TEXTAREA" || hasClosestByAttribute(target, "contenteditable", null)) {
+ if (target.tagName === "INPUT" || target.tagName === "TEXTAREA" ||
+ hasClosestByAttribute(target, "contenteditable", null) ||
+ hasClosestByClassName(target, "protyle", true)) {
return false;
}
if (bindMenuKeydown(event)) {