From 374de4e00a668c4313a7fcac97cbebf47f63660d Mon Sep 17 00:00:00 2001 From: Vanessa Date: Thu, 8 Dec 2022 22:27:18 +0800 Subject: [PATCH] :art: https://github.com/siyuan-note/siyuan/issues/5400 --- app/src/util/globalShortcut.ts | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/app/src/util/globalShortcut.ts b/app/src/util/globalShortcut.ts index 6961403f5..894c4946a 100644 --- a/app/src/util/globalShortcut.ts +++ b/app/src/util/globalShortcut.ts @@ -438,7 +438,7 @@ export const globalShortcut = () => { } switchDialog = new Dialog({ content: `
-
+
    ${dockHtml}
    ${tabHtml}
@@ -454,9 +454,8 @@ export const globalShortcut = () => { } } }); - if (range) { - getSelection().removeAllRanges(); - } + // 需移走光标,否则编辑器会继续监听并执行按键操作 + switchDialog.element.querySelector("input").focus(); if (isMac()) { switchDialog.element.addEventListener("contextmenu", (event) => { switchDialogEvent(event, switchDialog);