Dont autofocus the text input on mobile

On mobile we dont want to auto focus because the keyboard opens
and takes up most of the screen space.
This commit is contained in:
Jackson Harper 2022-04-12 20:08:18 -07:00
parent 92a061b4ba
commit 11429dddc0

View file

@ -50,14 +50,14 @@ function Header(props: HeaderProps): JSX.Element {
const inputRef = useRef<HTMLInputElement>(null)
useEffect(() => {
if (props.focused && inputRef.current) {
if (!isTouchScreenDevice() && props.focused && inputRef.current) {
inputRef.current.focus()
}
}, [props.focused])
return (
<VStack css={{ width: '100%', my: '0px', borderBottom: '1px solid $grayBorder'}}>
<Box css={{
<Box css={{
width: '100%',
my: '14px',
px: '14px',