From e6a2a16bba566726ef8d12f124358720c2ad1560 Mon Sep 17 00:00:00 2001 From: Sam Catlow Date: Fri, 13 Nov 2026 13:00:46 +1100 Subject: [PATCH] fix(ui): the command palette opens on Ctrl+K only --- .../command-palette/CommandPalette.vue | 20 ------------------- 1 file changed, 20 deletions(-) diff --git a/ui/src/components/command-palette/CommandPalette.vue b/ui/src/components/command-palette/CommandPalette.vue index a5a668840..e79c9fb97 100644 --- a/ui/src/components/command-palette/CommandPalette.vue +++ b/ui/src/components/command-palette/CommandPalette.vue @@ -80,30 +80,10 @@ function newTask(): void { emit("newTask"); } -// '/' opens only when the keystroke was not meant for a field. -function isEditableTarget(event: KeyboardEvent): boolean { - const el = event.target; - return ( - el instanceof HTMLElement && - (el.isContentEditable || ["INPUT", "TEXTAREA", "SELECT"].includes(el.tagName)) - ); -} - function onGlobalKeydown(event: KeyboardEvent): void { if ((event.metaKey || event.ctrlKey) && event.key.toLowerCase() === "k") { event.preventDefault(); open.value = !open.value; - } else if ( - // A bare "/" only: Ctrl+/ belongs to the chat dock. - event.key === "/" && - !event.ctrlKey && - !event.metaKey && - !event.altKey && - !open.value && - !isEditableTarget(event) - ) { - event.preventDefault(); - open.value = true; } }