diff --git a/src/view/com/composer/Composer.tsx b/src/view/com/composer/Composer.tsx index 9bb704012e..80bce5351c 100644 --- a/src/view/com/composer/Composer.tsx +++ b/src/view/com/composer/Composer.tsx @@ -415,12 +415,14 @@ export const ComposePost = observer(function ComposePost({ bottomBarAnimatedStyle, } = useAnimatedBorders() + const keyboardVerticalOffset = useKeyboardVerticalOffset() + return ( + keyboardVerticalOffset={keyboardVerticalOffset} + style={a.flex_1}> @@ -741,6 +743,19 @@ function useAnimatedBorders() { } } +function useKeyboardVerticalOffset() { + const {top} = useSafeAreaInsets() + + // Android etc + if (!isIOS) return 0 + + // iPhone SE + if (top === 20) return 40 + + // all other iPhones + return top + 10 +} + const styles = StyleSheet.create({ topbarInner: { flexDirection: 'row',