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: `
-
+
@@ -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);