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; } }