From 6926921503a7c29ec7342643def96edde468f7ee Mon Sep 17 00:00:00 2001 From: Vanessa Date: Sat, 30 Jul 2022 17:07:09 +0800 Subject: [PATCH] :bug: fix https://github.com/siyuan-note/siyuan/issues/5541 --- app/src/protyle/toolbar/index.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/src/protyle/toolbar/index.ts b/app/src/protyle/toolbar/index.ts index 2fa56cc89..c7249ea9e 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");