From 3511ba760aeabf7ee2cf0baf1060c98f2a6a4e60 Mon Sep 17 00:00:00 2001 From: Lim Chee Aun Date: Mon, 4 Sep 2023 00:07:11 +0800 Subject: [PATCH] Try autofocus on search field I commented this out for some reason that I forgot --- src/pages/search.jsx | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/pages/search.jsx b/src/pages/search.jsx index 96c269d9..7775308d 100644 --- a/src/pages/search.jsx +++ b/src/pages/search.jsx @@ -125,13 +125,11 @@ function Search(props) { } useEffect(() => { - // searchFieldRef.current?.focus?.(); - // searchFormRef.current?.focus?.(); if (q) { - // searchFieldRef.current.value = q; searchFormRef.current?.setValue?.(q); loadResults(true); } + searchFormRef.current?.focus?.(); }, [q, type, instance]); return (