Skip to content

Commit 84c98fe

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, and the card's limit leaves room for the floating control when one is showing, so the taller stack cannot push that control under the header.
1 parent 20c3dd3 commit 84c98fe

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

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

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1055,11 +1055,16 @@ function ThreadDetailBody(
10551055
windowHeight: screenAreaHeight,
10561056
keyboardHeight: keyboardStickyEnabled ? -keyboardTranslation.value : 0,
10571057
navigationHeaderHeight,
1058-
composerOverlapHeight: composerBottomInset,
1058+
// An in-flow question shares the room above it with the floating control.
1059+
composerOverlapHeight:
1060+
composerBottomInset +
1061+
(questionInFlow && showFloatingStatus ? FLOATING_WORKING_CONTROL_COVERAGE : 0),
10591062
}),
10601063
);
1064+
// A question pads itself clear of the bottom inset, below the card's own height limit.
1065+
const questionBottomInset = activeUserInputRequestId !== null ? composerBottomInset : 0;
10611066
const composerPanelsHeightStyle = useAnimatedStyle(() => ({
1062-
maxHeight: pendingUserInputMaxHeight.value,
1067+
maxHeight: pendingUserInputMaxHeight.value + questionBottomInset,
10631068
flexGrow: 0,
10641069
}));
10651070
// Questions overlay the composer on iOS; an approval sits above it, so it gives up its height.

0 commit comments

Comments
 (0)