Composer - backup android focus (#4415)
* backup android focus * bump to 300ms just to make sure it catches all of themzio/stable
parent
fefae27396
commit
29a4a5f90c
|
@ -402,6 +402,19 @@ export const ComposePost = observer(function ComposePost({
|
||||||
bottomBarAnimatedStyle,
|
bottomBarAnimatedStyle,
|
||||||
} = useAnimatedBorders()
|
} = useAnimatedBorders()
|
||||||
|
|
||||||
|
// Backup focus on android, if the keyboard *still* refuses to show
|
||||||
|
useEffect(() => {
|
||||||
|
if (!isAndroid) return
|
||||||
|
if (isModalReady) {
|
||||||
|
setTimeout(() => {
|
||||||
|
if (!Keyboard.isVisible()) {
|
||||||
|
textInput.current?.blur()
|
||||||
|
textInput.current?.focus()
|
||||||
|
}
|
||||||
|
}, 300)
|
||||||
|
}
|
||||||
|
}, [isModalReady])
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<KeyboardAvoidingView
|
<KeyboardAvoidingView
|
||||||
|
|
Loading…
Reference in New Issue