Skip to content

Commit 96aa40e

Browse files
fix(mobile): Keep a tall question's Submit button above Android's navigation bar (#33929)
Co-authored-by: Julius Marminge <[email protected]>
1 parent a03f718 commit 96aa40e

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
@@ -1063,11 +1063,16 @@ function ThreadDetailBody(
10631063
windowHeight: screenAreaHeight,
10641064
keyboardHeight: keyboardStickyEnabled ? -keyboardTranslation.value : 0,
10651065
navigationHeaderHeight,
1066-
composerOverlapHeight: composerBottomInset,
1066+
// An in-flow question shares the room above it with the floating control.
1067+
composerOverlapHeight:
1068+
composerBottomInset +
1069+
(questionInFlow && showFloatingStatus ? FLOATING_WORKING_CONTROL_COVERAGE : 0),
10671070
}),
10681071
);
1072+
// A question pads itself clear of the bottom inset, below the card's own height limit.
1073+
const questionBottomInset = activeUserInputRequestId !== null ? composerBottomInset : 0;
10691074
const composerPanelsHeightStyle = useAnimatedStyle(() => ({
1070-
maxHeight: pendingUserInputMaxHeight.value,
1075+
maxHeight: pendingUserInputMaxHeight.value + questionBottomInset,
10711076
flexGrow: 0,
10721077
}));
10731078
// Questions overlay the composer on iOS; an approval sits above it, so it gives up its height.

0 commit comments

Comments
 (0)