From 98350e7768d0dad4f380668b65854f6a8cae5388 Mon Sep 17 00:00:00 2001 From: Vanessa Date: Wed, 22 Feb 2023 09:45:07 +0800 Subject: [PATCH] :art: fix https://github.com/siyuan-note/siyuan/issues/7440 --- app/src/util/globalShortcut.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/src/util/globalShortcut.ts b/app/src/util/globalShortcut.ts index 8d679498f..11f4fce35 100644 --- a/app/src/util/globalShortcut.ts +++ b/app/src/util/globalShortcut.ts @@ -95,7 +95,8 @@ export const globalShortcut = () => { }); window.siyuan.hideBreadcrumb = false; } - if (!isWindow() && !hasClosestByClassName(event.target, "b3-dialog") && !hasClosestByClassName(event.target, "b3-menu")) { + if (event.buttons === 0 && // 鼠标按键被按下时不触发 + !isWindow() && !hasClosestByClassName(event.target, "b3-dialog") && !hasClosestByClassName(event.target, "b3-menu")) { if (event.clientX < 43) { if (!window.siyuan.layout.leftDock.pin && window.siyuan.layout.leftDock.layout.element.clientWidth > 0 && // 隐藏停靠栏会导致点击两侧内容触发浮动面板弹出,因此需减小鼠标范围