You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Odometer] [$250] Distance - Odometer - Next button is hidden behind the keyboard #82647
Version Number: 9.3.20-2 Reproducible in staging?: Yes Reproducible in production?: Yes If this was caught during regression testing, add the test name, ID and link from BrowserStack:#82204 Email or phone of affected tester (no customers):applausetester+ihbuiivyw@applause.expensifail.com Issue reported by: Applause Internal Team Bug source: Exploratory - Significant User Experience Deterioration Device used: iPhone 15 Pro Max / iOS 26.2 App Component: Money Requests
Action Performed:
Precondition:
Log in with Expensifail account.
Launch Expensify app.
Open FAB > Track distance > Odometer.
Tap Start reading field.
Expected Result:
Next button will appear above the keyboard.
Actual Result:
Next button is hidden behind the keyboard.
Tapping outside the keyboard does not dismiss the keyboard. User cannot reach Next button when keyboard is opened.
Please re-state the problem that we are trying to solve in this issue.
Next button is hidden behind the keyboard. Tapping outside the keyboard does not dismiss the keyboard. User cannot reach Next button when keyboard is opened.
What is the root cause of that problem?
In DistanceRequestStartPage.tsx, the ScreenWrapper has shouldEnableKeyboardAvoidingView={false}. This was fine when only the Map and Manual tabs existed (they don't use native keyboard TextInputs), but now the Odometer tab uses standard TextInput components that trigger the native keyboard. Since KeyboardAvoidingView is disabled, the view doesn't resize when the keyboard opens, so the Next button at the bottom remains behind the keyboard and is unreachable.
What changes do you think we should make in order to solve the problem?
We should make shouldEnableKeyboardAvoidingView dynamic based on the currently selected tab. When the Odometer tab is active, enable it so the view resizes properly when the keyboard appears.
What alternative solutions did you explore? (Optional)
An alternative would be wrapping the Odometer content in its own KeyboardAvoidingView inside IOURequestStepDistanceOdometer.tsx, but this approach is less ideal because the parent ScreenWrapper already provides this functionality — we just need to enable it conditionally.
Reminder: Please use plain English, be brief and avoid jargon. Feel free to use images, charts or pseudo-code if necessary. Do not post large multi-line diffs or write walls of text. Do not create PRs unless you have been hired for this job.
Please re-state the problem that we are trying to solve in this issue.
The Next button is hidden behind the keyboard. Tapping outside does not dismiss the keyboard. User cannot reach the Next button while the keyboard is open.
Platforms: Android App, iOS App.
What is the root cause of that problem?
The Odometer step is shown as a tab inside DistanceRequestStartPage. That page uses a single ScreenWrapper with shouldEnableKeyboardAvoidingView={false}, so no KeyboardAvoidingView is active for the whole screen (header, tab bar, and tab content). When the user focuses the Start or End reading field on the Odometer tab, the keyboard opens and the layout does not shift; the Next button stays at the bottom and is covered by the keyboard.
When creating a new request from the Track distance flow, the Odometer content is rendered with shouldShowWrapper={!isCreatingNewRequest} (i.e. true → false), so StepScreenWrapper does not render its inner ScreenWrapper and the form is rendered directly under the page’s ScreenWrapper. Thus the Odometer form never gets keyboard-avoiding behavior. The form is also not inside a ScrollView, so there is no scroll-to-reveal and no drag-to-dismiss for the keyboard.
Relevant code (permallinks to main):
DistanceRequestStartPage – ScreenWrapper with shouldEnableKeyboardAvoidingView={false} wraps the entire page (header, tab bar, and tab content). No keyboard offset is passed.
IOURequestStepDistanceOdometer – Form content is a single View with justifyContentBetween; no ScrollView and no keyboard-avoiding wrapper when used as tab content.
What changes do you think we should make in order to solve the problem?
DistanceRequestStartPage – When the Odometer tab is selected, enable keyboard avoiding on the page ScreenWrapper and set keyboardVerticalOffset so the visible header and tab bar are accounted for (same pattern as IOURequestStepDestination when opened from the start page). This keeps the Next button above the keyboard on Android and iOS.
IOURequestStepDistanceOdometer – Wrap the form in a ScrollView with keyboardShouldPersistTaps="handled" (so the Next button remains tappable with the keyboard open) and keyboardDismissMode="on-drag" (so scrolling/dragging dismisses the keyboard). Use contentContainerStyle={[styles.flexGrow1]} so layout and button position are preserved while allowing scroll when needed.
Solution – new code (git diff):
--- a/App/src/pages/iou/request/DistanceRequestStartPage.tsx+++ b/App/src/pages/iou/request/DistanceRequestStartPage.tsx@@ -14,6 +14,8 @@ import usePermissions from '@hooks/usePermissions';
import usePersonalPolicy from '@hooks/usePersonalPolicy';
import usePolicy from '@hooks/usePolicy';
import usePrevious from '@hooks/usePrevious';
+import useSafeAreaInsets from '@hooks/useSafeAreaInsets';
import useThemeStyles from '@hooks/useThemeStyles';
import {canUseTouchScreen} from '@libs/DeviceCapabilities';
+import variables from '@styles/variables';
import getNonEmptyStringOnyxID from '@libs/getNonEmptyStringOnyxID';
import Navigation from '@libs/Navigation/Navigation';
import OnyxTabNavigator, {TabScreenWithFocusTrapWrapper, TopTab} from '@libs/Navigation/OnyxTabNavigator';
@@ -50,6 +52,7 @@ function DistanceRequestStartPage({
}: DistanceRequestStartPageProps) {
const styles = useThemeStyles();
const {translate} = useLocalize();
+ const {top} = useSafeAreaInsets();
const [report] = useOnyx(`${ONYXKEYS.COLLECTION.REPORT}${reportID}`, {canBeMissing: true});
const [parentReport] = useOnyx(`${ONYXKEYS.COLLECTION.REPORT}${report?.parentReportID}`, {canBeMissing: true});
const policy = usePolicy(report?.policyID);
@@ -162,11 +165,15 @@ function DistanceRequestStartPage({
const focusTrapContainerElements = useMemo(() => {
return [headerWithBackBtnContainerElement, tabBarContainerElement, activeTabContainerElement].filter((element) => !!element);
}, [headerWithBackBtnContainerElement, tabBarContainerElement, activeTabContainerElement]);
+ const isOdometerTabSelected = selectedTab === CONST.TAB_REQUEST.DISTANCE_ODOMETER;+ const keyboardVerticalOffset =+ isOdometerTabSelected ? variables.contentHeaderHeight + top + variables.tabSelectorButtonHeight + variables.tabSelectorButtonPadding : undefined;+
return (
<AccessOrNotFoundWrapper
reportID={reportID}
iouType={iouType}
policyID={policy?.id}
accessVariants={[CONST.IOU.ACCESS_VARIANTS.CREATE]}
allPolicies={allPolicies}
>
<ScreenWrapper
- shouldEnableKeyboardAvoidingView={false}+ shouldEnableKeyboardAvoidingView={isOdometerTabSelected}+ keyboardVerticalOffset={keyboardVerticalOffset}
shouldEnableMinHeight={canUseTouchScreen()}
testID="DistanceRequestStartPage"
focusTrapSettings={{containerElements: focusTrapContainerElements}}
>
--- a/App/src/pages/iou/request/step/IOURequestStepDistanceOdometer.tsx+++ b/App/src/pages/iou/request/step/IOURequestStepDistanceOdometer.tsx@@ -2,6 +2,7 @@ import reportsSelector from '@selectors/Attributes';
import React, {useCallback, useEffect, useMemo, useRef, useState} from 'react';
import {View} from 'react-native';
+import ScrollView from '@components/ScrollView';
import type {OnyxEntry} from 'react-native-onyx';
import Button from '@components/Button';
import FormHelpMessage from '@components/FormHelpMessage';
@@ -414,7 +415,13 @@ function IOURequestStepDistanceOdometer({
includeSafeAreaPaddingBottom
>
<View style={[styles.flex1, styles.flexColumn, styles.justifyContentBetween, styles.ph5, styles.pt5, styles.mb5]}>
+ <ScrollView+ style={[styles.flex1]}+ contentContainerStyle={[styles.flexGrow1]}+ keyboardShouldPersistTaps="handled"+ keyboardDismissMode="on-drag"+ >
<View>
{/* Start Reading */}
<View style={[styles.mb6, styles.flexRow, styles.alignItemsCenter, styles.gap3]}>
@@ -594,6 +601,7 @@ function IOURequestStepDistanceOdometer({
/>
</View>
</View>
+ </ScrollView>
<DiscardChangesConfirmation
isEnabled={shouldEnableDiscardConfirmation}
getHasUnsavedChanges={() => {
Summary: The Next button on the Odometer tab in the Track Distance flow is hidden behind the keyboard because the parent ScreenWrapper has keyboard avoidance explicitly disabled, and the Odometer component has no fallback scroll or keyboard-dismiss behavior.
Root Cause:DistanceRequestStartPage.tsx:173 sets shouldEnableKeyboardAvoidingView={false} on its ScreenWrapper. This was appropriate when only the Map and Manual tabs existed (neither uses native keyboard TextInputs), but the Odometer tab introduces TextInput fields for Start/End readings that trigger the native keyboard. Since the KeyboardAvoidingView is disabled, the layout does not resize when the keyboard opens, leaving the Next button hidden behind it.
Additionally, when creating a new request, the Odometer component's StepScreenWrapper renders with shouldShowWrapper={!isCreatingNewRequest} (i.e., false), so it skips its own ScreenWrapper entirely (IOURequestStepDistanceOdometer.tsx:490). This means there is noKeyboardAvoidingView at any level during new request creation.
Recommended Fix: Make shouldEnableKeyboardAvoidingView conditional based on the selected tab — enable it when the Odometer tab is active, keep it disabled for other tabs. This is the minimal change that addresses the core issue without risking regressions on the Map/Manual/GPS tabs.
Both contributor proposals correctly identify the root cause. @daledah's proposal is the simpler and more focused fix — toggling shouldEnableKeyboardAvoidingView based on the selected tab. @abbasifaizan70's proposal adds a ScrollView and keyboardVerticalOffset computation on top, which may provide additional resilience on very small screens but also introduces more surface area for regressions.
One consideration: the keyboardVerticalOffset may need to be set to account for the header + tab bar height above the content area, depending on how react-native-keyboard-controller computes the avoiding offset. This should be validated during testing on both iOS and Android.
Detailed Investigation
Root Cause Analysis
The view hierarchy for the Odometer tab during new request creation is:
DistanceRequestStartPage → ScreenWrapper with shouldEnableKeyboardAvoidingView={false}
ScreenWrapper → ScreenWrapperContainer → KeyboardAvoidingView with enabled={false}
Inside the tab: IOURequestStepDistanceOdometer → StepScreenWrapper with shouldShowWrapper={false}
StepScreenWrapper just renders children in FullPageNotFoundView — no secondary ScreenWrapper
Top section: Start/End reading TextInput fields with DECIMAL_PAD keyboard
Bottom section: Error message + Next Button
With KeyboardAvoidingView disabled and no ScrollView, when the keyboard opens:
The layout does not resize or add padding
The Next button remains at the absolute bottom of the view, behind the keyboard
There is no keyboard dismiss handler for tapping outside the inputs
Evidence Chain
shouldEnableKeyboardAvoidingView={false} on DistanceRequestStartPage.tsx:173 → ScreenWrapperContainer receives enabled={false} → KeyboardAvoidingView from react-native-keyboard-controller is disabled on iOS/Android → layout does not adjust when keyboard opens → Next button (positioned via justifyContentBetween) stays at original position → keyboard covers it
The fix should be conditional (only enable for Odometer tab) to avoid potential side effects on Map/Manual/GPS tabs
A keyboardVerticalOffset may be needed to account for the header and tab bar — should be tested on device
The "tapping outside doesn't dismiss keyboard" symptom is secondary; with keyboard avoiding enabled, the Next button will be visible and usable even with the keyboard open
Next Steps for Contributor+ team: Reply with @MelvinBot implement this to create a draft PR, or @MelvinBot <your feedback> to refine this analysis.
changed the title [-][$250] Distance - Odometer - Next button is hidden behind the keyboard[/-][+][Odometer] [$250] Distance - Odometer - Next button is hidden behind the keyboard[/+]on Mar 2, 2026
Activity
daledah commentedon Feb 17, 2026
Proposal
Please re-state the problem that we are trying to solve in this issue.
Next button is hidden behind the keyboard. Tapping outside the keyboard does not dismiss the keyboard. User cannot reach Next button when keyboard is opened.
What is the root cause of that problem?
In
DistanceRequestStartPage.tsx, theScreenWrapperhasshouldEnableKeyboardAvoidingView={false}. This was fine when only the Map and Manual tabs existed (they don't use native keyboard TextInputs), but now the Odometer tab uses standardTextInputcomponents that trigger the native keyboard. SinceKeyboardAvoidingViewis disabled, the view doesn't resize when the keyboard opens, so the Next button at the bottom remains behind the keyboard and is unreachable.App/src/pages/iou/request/DistanceRequestStartPage.tsx
Line 175 in baed797
What changes do you think we should make in order to solve the problem?
We should make
shouldEnableKeyboardAvoidingViewdynamic based on the currently selected tab. When the Odometer tab is active, enable it so the view resizes properly when the keyboard appears.What alternative solutions did you explore? (Optional)
An alternative would be wrapping the Odometer content in its own
KeyboardAvoidingViewinsideIOURequestStepDistanceOdometer.tsx, but this approach is less ideal because the parentScreenWrapperalready provides this functionality — we just need to enable it conditionally.Reminder: Please use plain English, be brief and avoid jargon. Feel free to use images, charts or pseudo-code if necessary. Do not post large multi-line diffs or write walls of text. Do not create PRs unless you have been hired for this job.
abbasifaizan70 commentedon Feb 17, 2026
Proposal
Please re-state the problem that we are trying to solve in this issue.
The Next button is hidden behind the keyboard. Tapping outside does not dismiss the keyboard. User cannot reach the Next button while the keyboard is open.
Platforms: Android App, iOS App.
What is the root cause of that problem?
The Odometer step is shown as a tab inside
DistanceRequestStartPage. That page uses a singleScreenWrapperwithshouldEnableKeyboardAvoidingView={false}, so noKeyboardAvoidingViewis active for the whole screen (header, tab bar, and tab content). When the user focuses the Start or End reading field on the Odometer tab, the keyboard opens and the layout does not shift; the Next button stays at the bottom and is covered by the keyboard.When creating a new request from the Track distance flow, the Odometer content is rendered with
shouldShowWrapper={!isCreatingNewRequest}(i.e.true→ false), soStepScreenWrapperdoes not render its innerScreenWrapperand the form is rendered directly under the page’sScreenWrapper. Thus the Odometer form never gets keyboard-avoiding behavior. The form is also not inside aScrollView, so there is no scroll-to-reveal and no drag-to-dismiss for the keyboard.Relevant code (permallinks to
main):DistanceRequestStartPage –
ScreenWrapperwithshouldEnableKeyboardAvoidingView={false}wraps the entire page (header, tab bar, and tab content). No keyboard offset is passed.App/src/pages/iou/request/DistanceRequestStartPage.tsx
Lines 174 to 179 in 13da2f9
IOURequestStepDistanceOdometer – Form content is a single
ViewwithjustifyContentBetween; noScrollViewand no keyboard-avoiding wrapper when used as tab content.App/src/pages/iou/request/step/IOURequestStepDistanceOdometer.tsx
Lines 414 to 423 in 13da2f9
What changes do you think we should make in order to solve the problem?
DistanceRequestStartPage – When the Odometer tab is selected, enable keyboard avoiding on the page
ScreenWrapperand setkeyboardVerticalOffsetso the visible header and tab bar are accounted for (same pattern asIOURequestStepDestinationwhen opened from the start page). This keeps the Next button above the keyboard on Android and iOS.IOURequestStepDistanceOdometer – Wrap the form in a
ScrollViewwithkeyboardShouldPersistTaps="handled"(so the Next button remains tappable with the keyboard open) andkeyboardDismissMode="on-drag"(so scrolling/dragging dismisses the keyboard). UsecontentContainerStyle={[styles.flexGrow1]}so layout and button position are preserved while allowing scroll when needed.Solution – new code (git diff):
melvin-bot commentedon Feb 23, 2026
Huh... This is 4 days overdue. Who can take care of this?
melvin-bot commentedon Feb 24, 2026
Triggered auto assignment to @bfitzexpensify (
Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.MelvinBot commentedon Feb 24, 2026
🔍 Issue Analysis
Summary: The Next button on the Odometer tab in the Track Distance flow is hidden behind the keyboard because the parent
ScreenWrapperhas keyboard avoidance explicitly disabled, and the Odometer component has no fallback scroll or keyboard-dismiss behavior.Root Cause:
DistanceRequestStartPage.tsx:173setsshouldEnableKeyboardAvoidingView={false}on itsScreenWrapper. This was appropriate when only the Map and Manual tabs existed (neither uses native keyboard TextInputs), but the Odometer tab introducesTextInputfields for Start/End readings that trigger the native keyboard. Since theKeyboardAvoidingViewis disabled, the layout does not resize when the keyboard opens, leaving the Next button hidden behind it.Additionally, when creating a new request, the Odometer component's
StepScreenWrapperrenders withshouldShowWrapper={!isCreatingNewRequest}(i.e.,false), so it skips its ownScreenWrapperentirely (IOURequestStepDistanceOdometer.tsx:490). This means there is noKeyboardAvoidingViewat any level during new request creation.Recommended Fix: Make
shouldEnableKeyboardAvoidingViewconditional based on the selected tab — enable it when the Odometer tab is active, keep it disabled for other tabs. This is the minimal change that addresses the core issue without risking regressions on the Map/Manual/GPS tabs.Note on Existing Proposals
Both contributor proposals correctly identify the root cause. @daledah's proposal is the simpler and more focused fix — toggling
shouldEnableKeyboardAvoidingViewbased on the selected tab. @abbasifaizan70's proposal adds aScrollViewandkeyboardVerticalOffsetcomputation on top, which may provide additional resilience on very small screens but also introduces more surface area for regressions.One consideration: the
keyboardVerticalOffsetmay need to be set to account for the header + tab bar height above the content area, depending on howreact-native-keyboard-controllercomputes the avoiding offset. This should be validated during testing on both iOS and Android.Detailed Investigation
Root Cause Analysis
The view hierarchy for the Odometer tab during new request creation is:
DistanceRequestStartPage→ScreenWrapperwithshouldEnableKeyboardAvoidingView={false}ScreenWrapper→ScreenWrapperContainer→KeyboardAvoidingViewwithenabled={false}IOURequestStepDistanceOdometer→StepScreenWrapperwithshouldShowWrapper={false}StepScreenWrapperjust renders children inFullPageNotFoundView— no secondaryScreenWrapperThe Odometer form content (
IOURequestStepDistanceOdometer.tsx:493-622) is a plainViewwithflexColumnandjustifyContentBetween:TextInputfields withDECIMAL_PADkeyboardButtonWith
KeyboardAvoidingViewdisabled and noScrollView, when the keyboard opens:Evidence Chain
shouldEnableKeyboardAvoidingView={false}onDistanceRequestStartPage.tsx:173→ScreenWrapperContainerreceivesenabled={false}→KeyboardAvoidingViewfromreact-native-keyboard-controlleris disabled on iOS/Android → layout does not adjust when keyboard opens → Next button (positioned viajustifyContentBetween) stays at original position → keyboard covers itRelevant Code
DistanceRequestStartPage.tsx:172-177— ScreenWrapper with keyboard avoiding disabledIOURequestStepDistanceOdometer.tsx:490— shouldShowWrapper={!isCreatingNewRequest} skips StepScreenWrapper's own ScreenWrapperIOURequestStepDistanceOdometer.tsx:493-622— Form layout with no ScrollView and Next button at bottomScreenWrapperContainer.tsx:220-228— Where KeyboardAvoidingView receives theenabledpropStepScreenWrapper.tsx:58-59— Short-circuit when shouldShowWrapper is falseImplementation Notes
keyboardVerticalOffsetmay be needed to account for the header and tab bar — should be tested on deviceNext Steps for Contributor+ team: Reply with
@MelvinBot implement thisto create a draft PR, or@MelvinBot <your feedback>to refine this analysis.12 remaining items
[-][$250] Distance - Odometer - Next button is hidden behind the keyboard[/-][+][Odometer] [$250] Distance - Odometer - Next button is hidden behind the keyboard[/+]Julesssss commentedon Mar 3, 2026
Upstream blocker was merged.
Julesssss commentedon Mar 12, 2026
Upstream blocker was reverted, awaiting new PR here.
Julesssss commentedon Mar 12, 2026
PR merged