diff --git a/frontend/src/App.vue b/frontend/src/App.vue index 9e95deb..b1660db 100644 --- a/frontend/src/App.vue +++ b/frontend/src/App.vue @@ -52,16 +52,18 @@ function onGlobalKeydown(e: KeyboardEvent) { return; } - // Escape — close shortcuts overlay OR navigate home + // Escape — progressive: close overlay → unfocus field → go home if (e.key === "Escape") { clearPrefix(); if (showShortcuts.value) { closeShortcuts(); return; } - if (!isInputActive()) { - router.push("/"); + if (isInputActive()) { + (document.activeElement as HTMLElement).blur(); + return; } + router.push("/"); return; } @@ -173,7 +175,7 @@ onUnmounted(() => {