From 0fc0ff6c49b72d45300e78824af3ddd25f5a37f7 Mon Sep 17 00:00:00 2001 From: icedterminal Date: Thu, 21 Oct 2021 19:38:52 -0700 Subject: [PATCH] Remove search auto focus Major annoyance for mobile devices. Mostly tablets that have large keyboards in landscape. You're forced to dismiss the keyboard every time you load the page. --- client/src/components/SearchBar/SearchBar.tsx | 4 ---- 1 file changed, 4 deletions(-) diff --git a/client/src/components/SearchBar/SearchBar.tsx b/client/src/components/SearchBar/SearchBar.tsx index 887a2ef..6f73778 100644 --- a/client/src/components/SearchBar/SearchBar.tsx +++ b/client/src/components/SearchBar/SearchBar.tsx @@ -23,10 +23,6 @@ const SearchBar = (props: ComponentProps): JSX.Element => { const inputRef = useRef(document.createElement('input')); - useEffect(() => { - inputRef.current.focus(); - }, []); - const searchHandler = (e: KeyboardEvent) => { const { isLocal, search, query, isURL, sameTab } = searchParser( inputRef.current.value