Skip to content

Commit de46e0d

Browse files
committed
fix(mobile): Keep a tall question's Submit button above Android's navigation bar
On Android the panels above the composer scroll inside a view capped at the question card's own height limit. The card's wrapper adds the bottom inset below the card, so a card at that limit pushed the inset out of view and its Submit button sat under the system navigation bar, where taps never reach the app. The cap now includes that inset while a question is open.
1 parent 20c3dd3 commit de46e0d

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

‎apps/mobile/src/features/threads/ThreadDetailScreen.tsx‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1058,8 +1058,10 @@ function ThreadDetailBody(
10581058
composerOverlapHeight: composerBottomInset,
10591059
}),
10601060
);
1061+
// A question pads itself clear of the bottom inset, below the card's own height limit.
1062+
const questionBottomInset = activeUserInputRequestId !== null ? composerBottomInset : 0;
10611063
const composerPanelsHeightStyle = useAnimatedStyle(() => ({
1062-
maxHeight: pendingUserInputMaxHeight.value,
1064+
maxHeight: pendingUserInputMaxHeight.value + questionBottomInset,
10631065
flexGrow: 0,
10641066
}));
10651067
// Questions overlay the composer on iOS; an approval sits above it, so it gives up its height.

0 commit comments

Comments
 (0)