mirror of
https://github.com/omnivore-app/omnivore.git
synced 2026-03-11 08:54:26 +00:00
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:
parent
92a061b4ba
commit
11429dddc0
1 changed files with 2 additions and 2 deletions
|
|
@ -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',
|
||||
|
|
|
|||
Loading…
Reference in a new issue