From 874afc655edde6059d26da3d32bcb83c9b08c43a Mon Sep 17 00:00:00 2001 From: James Ritchie Date: Fri, 31 Jul 2026 21:35:29 +0100 Subject: [PATCH] fix(webapp): focus the search field when a filter sub-menu opens Sub-menus that load their options mount the search field after the popover is already open, so nothing focused it and you had to click into the field before typing. --- apps/webapp/app/components/primitives/Select.tsx | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/apps/webapp/app/components/primitives/Select.tsx b/apps/webapp/app/components/primitives/Select.tsx index 3c4c8faad0c..0f592767ae6 100644 --- a/apps/webapp/app/components/primitives/Select.tsx +++ b/apps/webapp/app/components/primitives/Select.tsx @@ -694,6 +694,15 @@ export function ComboBox({ shortcut, ...props }: ComboBoxProps) { + const combobox = Ariakit.useComboboxContext(); + const open = combobox?.useState("open"); + const input = combobox?.useState("baseElement"); + + React.useEffect(() => { + if (!open || !input) return; + input.focus(); + }, [open, input]); + return (