From 264c3664ba473bc6d95154e541c8de689a2206a2 Mon Sep 17 00:00:00 2001 From: Bryan Van Deusen Date: Wed, 4 Mar 2026 08:20:26 -0500 Subject: [PATCH] Escape progressively unfocuses then navigates home First Escape blurs the active input (reaching neutral state where shortcuts work), second Escape navigates home. Allows full keyboard navigation without touching the mouse to leave a focused field. Co-Authored-By: Claude Sonnet 4.6 --- frontend/src/App.vue | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) 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(() => {
Esc - Go home (when not typing) + Unfocus field → go home
?