Skip to content

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

:bug: 面板快捷键

Vanessa80d584543423
diff --git a/app/src/util/globalShortcut.ts b/app/src/util/globalShortcut.ts
index abd6ca42cd..409eb3837f 100644
--- a/app/src/util/globalShortcut.ts
+++ b/app/src/util/globalShortcut.ts
@@ -1259,6 +1259,10 @@ const fileTreeKeydown = (event: KeyboardEvent) => {
const panelTreeKeydown = (event: KeyboardEvent) => {
// 面板折叠展开操作
+ const target = event.target as HTMLElement;
+ if (target.tagName === "INPUT" || target.tagName === "TEXTAREA" || hasClosestByAttribute(target, "contenteditable", null)) {
+ return false;
+ }
if (!matchHotKey(window.siyuan.config.keymap.editor.general.collapse.custom, event) &&
!matchHotKey(window.siyuan.config.keymap.editor.general.expand.custom, event) &&
!event.key.startsWith("Arrow") && event.key !== "Enter") {
@@ -1317,6 +1321,9 @@ const panelTreeKeydown = (event: KeyboardEvent) => {
if (activeItemElement.parentElement.parentElement.classList.contains("backlinkMList")) {
tree = (model as Backlink).mTree;
}
+ if (!tree) {
+ return false
+ }
if (event.key === "Enter") {
tree.click(activeItemElement);
event.preventDefault();