disable alt text auto focus on Android (#4198)
* disable alt text auto focus on Android * revert timeout changezio/stable
parent
0e77280310
commit
e5fc0baa6a
|
@ -20,7 +20,7 @@ import {usePalette} from 'lib/hooks/usePalette'
|
||||||
import {enforceLen} from 'lib/strings/helpers'
|
import {enforceLen} from 'lib/strings/helpers'
|
||||||
import {gradients, s} from 'lib/styles'
|
import {gradients, s} from 'lib/styles'
|
||||||
import {useTheme} from 'lib/ThemeContext'
|
import {useTheme} from 'lib/ThemeContext'
|
||||||
import {isWeb} from 'platform/detection'
|
import {isAndroid, isWeb} from 'platform/detection'
|
||||||
import {ImageModel} from 'state/models/media/image'
|
import {ImageModel} from 'state/models/media/image'
|
||||||
import {Text} from '../util/text/Text'
|
import {Text} from '../util/text/Text'
|
||||||
import {ScrollView, TextInput} from './util'
|
import {ScrollView, TextInput} from './util'
|
||||||
|
@ -44,6 +44,7 @@ export function Component({image}: Props) {
|
||||||
|
|
||||||
// Autofocus hack when we open the modal. We have to wait for the animation to complete first
|
// Autofocus hack when we open the modal. We have to wait for the animation to complete first
|
||||||
React.useEffect(() => {
|
React.useEffect(() => {
|
||||||
|
if (isAndroid) return
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
inputRef.current?.focus()
|
inputRef.current?.focus()
|
||||||
}, 500)
|
}, 500)
|
||||||
|
|
Loading…
Reference in New Issue