diff options
author | Samuel Newman <mozzius@protonmail.com> | 2024-06-07 15:32:38 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-06-07 13:32:38 +0100 |
commit | 29a4a5f90c9cdea3ef30281f47cc1552570dc498 (patch) | |
tree | a501774500ff1fac19812150f9afa9d68da0dfc1 /src | |
parent | fefae27396d914e7b6e92cd52f300c4e919aaf65 (diff) | |
download | voidsky-29a4a5f90c9cdea3ef30281f47cc1552570dc498.tar.zst |
Composer - backup android focus (#4415)
* backup android focus * bump to 300ms just to make sure it catches all of them
Diffstat (limited to 'src')
-rw-r--r-- | src/view/com/composer/Composer.tsx | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/view/com/composer/Composer.tsx b/src/view/com/composer/Composer.tsx index 3c2b8db2d..7872ea186 100644 --- a/src/view/com/composer/Composer.tsx +++ b/src/view/com/composer/Composer.tsx @@ -402,6 +402,19 @@ export const ComposePost = observer(function ComposePost({ bottomBarAnimatedStyle, } = 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 ( <> <KeyboardAvoidingView |