diff --git a/desktop/src/features/search/ui/SearchDialog.tsx b/desktop/src/features/search/ui/SearchDialog.tsx index 58de6e51bb..ad7316862d 100644 --- a/desktop/src/features/search/ui/SearchDialog.tsx +++ b/desktop/src/features/search/ui/SearchDialog.tsx @@ -208,17 +208,7 @@ export function SearchDialog({ setQuery(""); setDebouncedQuery(""); setSelectedIndex(0); - return; } - - const timeout = window.setTimeout(() => { - inputRef.current?.focus(); - inputRef.current?.select(); - }, 0); - - return () => { - window.clearTimeout(timeout); - }; }, [open]); React.useEffect(() => { @@ -238,6 +228,10 @@ export function SearchDialog({ { + event.preventDefault(); + inputRef.current?.focus(); + }} > @@ -252,6 +246,7 @@ export function SearchDialog({
{