Skip to content

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

:bug: Allow opening command panel from read-only tab content https://github.com/siyuan-note/siyuan/issues/19374

Daniel25b9e49fe474
diff --git a/app/src/protyle/wysiwyg/keydown.ts b/app/src/protyle/wysiwyg/keydown.ts
index e49c6bc751..278081a90d 100644
--- a/app/src/protyle/wysiwyg/keydown.ts
+++ b/app/src/protyle/wysiwyg/keydown.ts
@@ -321,8 +321,9 @@ export const keydown = (protyle: IProtyle, editorElement: HTMLElement) => {
if (event.key === "Escape" && !event.isComposing && !event.repeat) {
return;
}
- // 放行锁定编辑快捷键,由全局快捷键处理器切换只读状态。
- if (matchHotKey(window.siyuan.config.keymap.general.editReadonly, event)) {
+ // 放行锁定编辑和命令面板快捷键,由全局快捷键处理器执行。
+ if (matchHotKey(window.siyuan.config.keymap.general.editReadonly, event) ||
+ matchHotKey(window.siyuan.config.keymap.general.commandPanel, event)) {
return;
}
event.stopPropagation();