From bfe11d31a6dc559bde4624b46c8cef88d95f624b Mon Sep 17 00:00:00 2001 From: Mohamed Boudra Date: Wed, 4 Nov 2026 03:52:26 +0100 Subject: [PATCH] fix(app): separate iOS composer clipping from its shadow Keep explicit coverage of the existing keyboard rotation guard. Co-authored-by: Elsa Granger --- packages/app/src/composer/input/input.tsx | 10 ++++++++-- .../src/keyboard/shift/internal/policy.test.ts | 15 +++++++++++++++ 2 files changed, 23 insertions(+), 2 deletions(-) diff --git a/packages/app/src/composer/input/input.tsx b/packages/app/src/composer/input/input.tsx index 618b923024..886ee88d24 100644 --- a/packages/app/src/composer/input/input.tsx +++ b/packages/app/src/composer/input/input.tsx @@ -8,6 +8,7 @@ import { import { LoadingSpinner } from "@/components/ui/loading-spinner"; import { View, + Platform, Text, useWindowDimensions, NativeSyntheticEvent, @@ -1930,7 +1931,7 @@ export const MessageInput = forwardRef( const inputWrapperCombinedStyle = useMemo( () => [ styles.inputWrapper, - isCompact && !isFullscreen && styles.inputWrapperCompact, + Platform.OS !== "ios" && isCompact && !isFullscreen && styles.inputWrapperCompact, readOnly && styles.inputWrapperReadOnly, inputWrapperStyle, { opacity: surfacePresentation.input.opacity }, @@ -2224,7 +2225,11 @@ export const MessageInput = forwardRef( return ( @@ -2269,6 +2274,7 @@ const styles = StyleSheet.create((theme: Theme) => ({ position: "relative", }, inputWrapper: { + ...(Platform.OS === "ios" ? { overflow: "hidden" as const } : {}), flexShrink: 1, flexDirection: "column", gap: theme.spacing[3], diff --git a/packages/app/src/keyboard/shift/internal/policy.test.ts b/packages/app/src/keyboard/shift/internal/policy.test.ts index 6867f3ffa1..300ee62b43 100644 --- a/packages/app/src/keyboard/shift/internal/policy.test.ts +++ b/packages/app/src/keyboard/shift/internal/policy.test.ts @@ -53,6 +53,21 @@ describe("resolveStreamKeyboardInset", () => { }); describe("resolveKeyboardShift", () => { + it.each([0, -1])( + "ignores a rotation report with height %s and progress one", + (rawKeyboardHeight) => { + expect( + resolveKeyboardShift({ + rawKeyboardHeight, + keyboardProgress: 1, + bottomInset: 24, + isIos: true, + iosMinHeight: 120, + }), + ).toBe(0); + }, + ); + it("keeps the existing open-keyboard offset behavior", () => { expect( resolveKeyboardShift({