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/5541

Vanessa6926921503a7
diff --git a/app/src/protyle/toolbar/index.ts b/app/src/protyle/toolbar/index.ts
index 2fa56cc89b..c7249ea9e8 100644
--- a/app/src/protyle/toolbar/index.ts
+++ b/app/src/protyle/toolbar/index.ts
@@ -862,6 +862,11 @@ export class Toolbar {
});
textElement.addEventListener("keydown", (event: KeyboardEvent) => {
event.stopPropagation();
+ // 阻止 ctrl+m 缩小窗口 https://github.com/siyuan-note/siyuan/issues/5541
+ if (matchHotKey(window.siyuan.config.keymap.editor.insert["inline-math"].custom, event)) {
+ event.preventDefault();
+ return;
+ }
if (event.isComposing) {
return;
}
@@ -877,7 +882,6 @@ export class Toolbar {
return;
}
/// #endif
-
if (event.key === "Escape" || matchHotKey("⌘↩", event)) {
this.subElement.classList.add("fn__none");
this.subElement.querySelector('[data-type="pin"]').classList.remove("block__icon--active");