fix(sessions): keep search focus when switching picker tabs

This commit is contained in:
Chris Scott committed 2026-10-15 16:36:23 -04:00
1 parent 87f28fbc6d
commit abcecd1c0c
2 files changed
+31 -2

No files matched your search

@@ -734,8 +734,11 @@ export function SessionPickerDialog({
useEffect(() => {
if (!open || !hasFinePointer) return
if (tab === 'projects') projectSearchInputRef.current?.focus()
else searchInputRef.current?.focus()
const frame = requestAnimationFrame(() => {
if (tab === 'projects') projectSearchInputRef.current?.focus()
else searchInputRef.current?.focus()
})
return () => cancelAnimationFrame(frame)
}, [open, tab, hasFinePointer])
return (