Skip to content

[Due for payment 2026-09-09] [$250] Keyboard Navigation-Unable to focus the Back button by pressing Tab in the Manual tab #98709

Closed

Description

@applause-bot

If you haven’t already, check out our contributing guidelines for onboarding. To join our Slack channel, fill out this form.


Version Number: v9.4.54-1
Reproducible in staging?: Yes
Reproducible in production?: Yes
If this was caught during regression testing, add the test name, ID and link from BrowserStack: #97678
Email or phone of affected tester (no customers): applausetester+ag140826ec@applause.expensifail.com
Issue reported by: Applause Internal Team
Bug source: Pull Request QA execution
Device used: Windows 11/ Chrome
App Component: Other

Action Performed:

Precondition: Select the Manual tab before executing the steps. This ensures that the Manual tab is the one opened after step 5 instead of any other tab.

  1. Go to staging.new.expensify.com
  2. Open any chat
  3. Press Tab until the + button next to the composer is focused
  4. Press Enter to open the menu
  5. Use ↓ to highlight Create expense, then press Enter
  6. Press Tab until the Back button is focused

Expected Result:

The Back button can be focused.

Actual Result:

The Back button can't be focused.
The issue also occurs in the Split expense flow (Manual tab).

Workaround:

Unknown

Platforms:

  • Android: App
  • Android: mWeb Chrome
  • iOS: App
  • iOS: mWeb Safari
  • iOS: mWeb Chrome
  • Windows: Chrome
  • MacOS: Chrome Safari

Screenshots/Videos

Bug7234055_1786759960623.back_button_focus.mp4

View all open jobs on GitHub

Applause Internal Information
Exported by: Julia Ponikarchuk
Bug ID: 7234055

Upwork Automation - Do Not Edit
Issue OwnerCurrent Issue Owner: @mallenexpensify

Activity

  1. added
    BugSomething is broken. Auto assigns a BugZero manager.
    on Aug 15, 2026
  2. applause-bot commented on Aug 15, 2026

    @applause-bot
    Author

    While Applause doesn't embed attachments for this bug, here are the links for quick view:
    https://platform.applause.com/services/links/v1/external/b36362239ebc12d41a97c9d26deecfd16c44abd7fa1efc7098a65ccf6edc75dd

  3. added
    ExternalAdded to denote the issue can be worked on by a contributor
    on Aug 15, 2026
  4. j3ffffff commented on Aug 15, 2026

    @j3ffffff
  5. MelvinBot commented on Aug 15, 2026

    @MelvinBot
    Contributor

    Proposal

    What is the root cause of that problem?

    The Back button and the RHP header are correctly wired into the screen's focus trap — so this is not the obvious "header left out of the tab order" bug. The header is registered as a focus‑trap container in IOURequestStartPage.tsx:282-290, and the Back button renders as a normal tabindex="0" role="button" in HeaderWithBackButton/index.tsx:210-236.

    The bug is specific to the Manual tab because it is the only tab that auto‑focuses a text input on entry (the amount keypad) in IOURequestStepAmount.tsx:164-177. With focus starting inside the amount input, focus-trap never advances Tab out to the header's container group — the most likely mechanism is that Tab escapes the trap's containers and focus-trap's "re-focus most‑recently‑focused node" fallback snaps focus back onto the amount input, so the Back button is never reached. This also explains why the same happens in the Split expense Manual tab (same IOURequestStartPage).

    Investigation details & evidence
    • Header IS a trap container: IOURequestStartPage collects [headerContainer, tabBarContainer, activeTabContainer] (IOURequestStartPage.tsx:210-216) and passes them to ScreenWrapper → FocusTrapForScreen/index.web.tsx:44-48 → focus-trap-react containerElements. The tabBar/activeTab containers are registered via OnyxTabNavigator.tsx and TabSelector.tsx:66.
    • Back button is natively focusable: PressableWithoutFeedback with role="button" and no focusable={false}/tabIndex=-1; react-native-web renders it with tabindex="0".
    • Manual tab auto-focuses the amount input, which is what differentiates it from Scan/Distance. The focus-trap fallback that re-focuses the last focused node (when a Tab escapes all containers) matches the reported symptom of focus being "stuck" on the amount field.
    • Related history: PR fix: enable tab on IOU request start page #45982 ("enable tab on IOU request start page") originally added this trap wiring, yet the bug persists in prod (v9.4.54-1).

    ⚠️ Verification gap: I attempted a live browser DOM check to confirm exactly which container/tabbable drops out of the cycle, but the test session came up blank and I couldn't drive the app. So the precise focus-trap mechanism (escape → MRU re‑focus vs. a container failing to register at runtime) is a strong hypothesis, not a confirmed observation. The reproduction itself is confirmed by the reporter (staging + production).

    What changes do you think we should make in order to solve the problem?

    Confirm with a browser DOM inspection which focus-trap fallback fires, then fix accordingly. The most probable fix is one of:

    1. Ensure the Manual tab's other interactive elements (currency selector, Next button) live inside the registered activeTabContainerElement and remain tabbable, so focus-trap's boundary redirect to the header group actually fires instead of falling back to re‑focusing the amount input; and/or
    2. Set an explicit tab order / setReturnFocus/initialFocus so focus-trap does not snap focus back to the auto‑focused amount input on Tab.

    The Back button and the header→trap wiring themselves should not be changed — they are correct.

    What alternative solutions did you explore? (Optional)

    Considered that the Back button was simply excluded from the tab order (tabIndex=-1/focusable={false}) — ruled out by the code above. Considered a general focus‑loss regression like the tracking issue #86699, but this reproduces deterministically only on the Manual tab, pointing at the amount‑input auto‑focus + focus‑trap interaction rather than a generic focus‑return bug.

    Possibly related issues: #86699 (Accessibility focus tracking), #96972 (focus lost after Back in Expense & Chat flows).


    Next Steps for Contributor+ team:
    To accept: @MelvinBot implement [this](https://github.com/Expensify/App/issues/98709) to create a draft PR.
    To refine: @MelvinBot <your feedback>
    To reject: Explain why you are rejecting Melvin's proposal.

  6. melvin-bot commented on Aug 15, 2026

    @melvin-bot

    Triggered auto assignment to Contributor-plus team member for initial proposal review - @shubham1206agra (External)

  7. melvin-bot commented on Aug 15, 2026

    @melvin-bot
  8. skrohan5016-coder commented on Aug 15, 2026

    @skrohan5016-coder

    I don't think the Back button or the amount-field autofocus is the failing layer here. IOURequestStartPage already owns a focus trap whose containers include the outer header, tab bar, and active tab, but the Manual tab embeds IOURequestStepConfirmation inside that active-tab container with shouldHideHeader:

    // confirmation's unmount cleanup restores the original tab a frame later, briefly flashing the
    // pre-inserted Search/Spend tab. This is a no-op when nothing was pre-inserted.
    Navigation.removePreInsertedFullscreenIfNeeded();
    Navigation.closeRHPFlow();
    };
    const [headerWithBackBtnContainerElement, setHeaderWithBackButtonContainerElement] = useState<HTMLElement | null>(null);
    const [tabBarContainerElement, setTabBarContainerElement] = useState<HTMLElement | null>(null);
    const [activeTabContainerElement, setActiveTabContainerElement] = useState<HTMLElement | null>(null);
    const focusTrapContainerElements = useMemo(() => {
    return [headerWithBackBtnContainerElement, tabBarContainerElement, activeTabContainerElement].filter((element) => !!element);
    }, [headerWithBackBtnContainerElement, tabBarContainerElement, activeTabContainerElement]);
    const onBackButtonPress = () => {
    navigateBack();
    return true;
    };
    useAndroidBackButtonHandler(onBackButtonPress);
    const shouldShowWorkspaceSelectForPerDiem = moreThanOnePerDiemExist && !hasCurrentPolicyPerDiemEnabled;
    let manualTabContent: React.ReactNode;
    if (!isNewManualExpenseFlowEnabled) {
    manualTabContent = (
    <IOURequestStepAmountWithTransactionOnly
    shouldKeepUserInput
    route={route}
    navigation={navigation}
    report={report}
    reportDraft={reportDraft}
    />
    );
    } else if (isScanRequest(transaction) || isPerDiemRequest(transaction)) {
    // When switching from the Scan or Per diem tab, the shared draft is briefly still a scan/per-diem request
    // until the tab-switch reset rebuilds it as manual. Mounting the embedded confirmation against that stale
    // draft does throwaway work that is immediately discarded once the reset lands - for scan a heavy first
    // render (scan loader, reading the receipt blob), and for per diem the confirmation renders per-diem UI
    // (wrong fields, and the "Confirm page shows per diem" bug). Wait for the reset so the manual confirmation
    // mounts once against the rebuilt manual draft.
    // The header and tab bar remain visible above this loader, so per UI-1 use ActivityIndicator (users can still go back) instead of FullScreenLoadingIndicator.
    manualTabContent = (
    <View style={[styles.flex1, styles.fullScreenLoading]}>
    <ActivityIndicator
    testID="manualTabPendingReset"
    size={CONST.ACTIVITY_INDICATOR_SIZE.LARGE}
    />
    </View>
    );
    } else {
    manualTabContent = (
    <IOURequestStepConfirmation
    route={route}
    navigation={navigation}
    shouldHideHeader
    />
    );
    }
    return (
    <AccessOrNotFoundWrapper
    reportID={reportID}
    iouType={iouType}
    policyID={policy?.id}
    accessVariants={[CONST.IOU.ACCESS_VARIANTS.CREATE]}
    allPolicies={iouType === CONST.IOU.TYPE.INVOICE ? allPolicies : undefined}
    >
    <ScreenWrapper
    shouldEnableKeyboardAvoidingView={isNewManualExpenseFlowEnabled}
    shouldEnableMaxHeight={selectedTab === CONST.TAB_REQUEST.PER_DIEM}
    shouldEnableMinHeight={canUseTouchScreen()}
    testID="IOURequestStartPage"
    focusTrapSettings={{containerElements: focusTrapContainerElements}}
    >
    {/* If the new manual expense flow is enabled, the confirmation screen is shown on the start page, so we do not want to disable the drag and drop provider in that case */}
    <DragAndDropProvider isDisabled={selectedTab !== CONST.TAB_REQUEST.SCAN && !(isNewManualExpenseFlowEnabled && selectedTab === CONST.TAB_REQUEST.MANUAL)}>
    <View style={styles.flex1}>
    <FocusTrapContainerElement
    onContainerElementChanged={setHeaderWithBackButtonContainerElement}
    style={[styles.w100]}
    >
    <HeaderWithBackButton
    title={tabTitles[iouType]}
    onBackButtonPress={navigateBack}
    />
    </FocusTrapContainerElement>
    {shouldUseTab ? (
    <OnyxTabNavigator
    id={CONST.TAB.IOU_REQUEST_TYPE}
    defaultSelectedTab={defaultSelectedTab}
    onTabSelected={resetIOUTypeIfChanged}

    shouldHideHeader skips the inner header and initializer, but it does not skip the inner ScreenWrapper:

    };
    const showReceiptEmptyState = shouldShowReceiptEmptyState(iouType, action, policy, isPerDiemRequest);
    const shouldShowSmartScanFields = !!transaction?.receipt?.isTestDriveReceipt || isMovingTransactionFromTrackExpense || requestType !== CONST.IOU.REQUEST_TYPE.SCAN;
    return (
    <ScreenWrapper
    shouldEnableMaxHeight={canUseTouchScreen() && !isMobileSafari()}
    shouldAvoidScrollOnVirtualViewport={!isMobileSafari()}
    testID="IOURequestStepConfirmation"
    >
    <TelemetrySpanManager
    iouType={iouType}
    requestType={requestType}
    hasReceipt={!!transaction?.receipt}
    />
    <DraftWorkspaceOpener
    isCreatingTrackExpense={isCreatingTrackExpense}
    policyID={policyID}
    policyPendingAction={policy?.pendingAction}
    policyExpenseChatPolicyID={policyExpenseChatPolicyID}
    senderPolicyID={senderPolicyID}
    isOffline={isOffline}
    />
    <ExpenseDefaultsSetter
    transactionIDs={transactionIDs}
    policy={policy}
    isPolicyExpenseChat={isPolicyExpenseChat}
    isMovingTransactionFromTrackExpense={isMovingTransactionFromTrackExpense}
    isCreatingTrackExpense={isCreatingTrackExpense}
    />
    {/*
    * When this screen is embedded on IOURequestStartPage (shouldHideHeader=true),
    * skip MoneyRequestInitializer to avoid duplicate initialization and navigation side effects.
    */}
    {!shouldHideHeader && (
    <MoneyRequestInitializer
    isLoadingTransaction={!!isLoadingTransaction}
    transaction={transaction}
    . Every ScreenWrapper creates a FocusTrapForScreen, and both wrappers see the same focused route, so both traps become active on the shared trap stack. The later inner trap contains only the confirmation subtree, which excludes the outer Back button; that is why Tab stays inside Manual confirmation even though the Back button is correctly included in the outer trap. The Split/Manual repro follows the same embedded component path.

    I would make the confirmation wrapper's trap inactive while it is embedded, for example by passing focusTrapSettings={{active: !shouldHideHeader}} to its ScreenWrapper, and leave the outer IOURequestStartPage trap as the sole owner of the combined header/tab/content cycle. Standalone confirmation routes would keep their existing trap, and the current header, autofocus, and tab-container wiring would remain unchanged. FocusTrapForScreen already supports an explicit active override before its route-focus fallback:

    function FocusTrapForScreen({children, focusTrapSettings}: FocusTrapProps) {
    const isFocused = useIsFocused();
    const route = useRoute();
    const {shouldUseNarrowLayout} = useResponsiveLayout();
    const isActive = useMemo(() => {
    if (typeof focusTrapSettings?.active !== 'undefined') {
    return focusTrapSettings.active;
    }
    // Focus trap can't be active on sidebar screens because it would block access to the tab bar.
    if (isSidebarScreenName(route.name)) {
    return false;
    }
    // in top tabs only focus trap for currently shown tab should be active
    if (TOP_TAB_SCREENS.find((screen) => screen === route.name)) {
    return isFocused;
    }
    // Focus trap can't be active on these screens if the layout is wide because they may be displayed side by side.
    if (WIDE_LAYOUT_INACTIVE_SCREENS.includes(route.name) && !shouldUseNarrowLayout) {
    return false;
    }
    return isFocused;
    }, [isFocused, shouldUseNarrowLayout, route.name, focusTrapSettings?.active]);
    return (

    The regression test should render the embedded Manual path and assert that only the outer trap is active and Tab can reach the Back button from the confirmation content, then render IOURequestStepConfirmation as a standalone route and verify its own trap is still active. The same embedded assertion should cover Split/Manual. Changing tab order or autofocus would only mask the nested ownership problem and leave two active traps competing for the same route.

  9. shubham1206agra commented on Aug 16, 2026

    @shubham1206agra
    Contributor

    🆘 C+ Help Wanted

  10. yusufdeveloper2903 commented on Aug 16, 2026

    @yusufdeveloper2903
    Contributor

    Proposal

    What is the root cause of that problem?

    On the new manual expense flow, IOURequestStartPage embeds IOURequestStepConfirmation as the Manual tab body with shouldHideHeader IOURequestStartPage.tsx#L255-L260. The page already builds one correct focus trap whose containers are the header (Back button), the tab bar and the active tab body IOURequestStartPage.tsx#L214-L216; with that trap alone, Tab reaches Back.

    But IOURequestStepConfirmation always renders its own ScreenWrapper, even when embedded IOURequestStepConfirmation.tsx#L862-L865, and every ScreenWrapper creates a FocusTrapForScreen. Its route manual is in TOP_TAB_SCREENS, so it activates when the tab is focused index.web.tsx#L33, and it passes no containerElements, so it traps only its own body index.web.tsx#L48. Both traps share sharedTrapStack; the confirmation's activates second (observed onActivate at stackLen: 1), sits on top and pauses the outer trap. Tab is then confined to the body — Amount → Merchant → Description → Category → Date → Create expense wraps back to the top of the body, never reaching Back.

    The sibling proves it: the amount step on the same page uses StepScreenWrapper with shouldShowWrapper={!!backTo || isEditing} IOURequestStepAmount.tsx#L278, rendering no wrapper/trap when embedded StepScreenWrapper.tsx#L72 — so Back is reachable there. The confirmation is the only embedded body that mounts a competing trap, which is why Back can't be focused in the Manual tab (and the Split Manual tab, the same component).

    What changes do you think we should make in order to solve the problem?

    Disable the confirmation's own focus trap when it is embedded, so the single IOURequestStartPage trap — which already contains the header, the tab bar and the body — governs Tab. ScreenWrapper already forwards focusTrapSettings, and FocusTrapForScreen honors an explicit active, so no new plumbing is needed.

    On the confirmation's ScreenWrapper IOURequestStepConfirmation.tsx#L862:

    focusTrapSettings={shouldHideHeader ? {active: false} : undefined}

    The constraint the confirmation's trap protects: it is required when the confirmation is a standalone screen (scan / edit / STEP_CONFIRMATION), where shouldHideHeader is false and it renders its own header + Back. Gating on shouldHideHeader keeps that path passing undefined, so it stays byte-for-byte unchanged — no regression. In embedded mode the outer trap already includes the confirmation body as its active-tab container element, so nothing loses trapping.

    Blast radius is one line: shouldHideHeader is only ever true on this embedded path IOURequestStepConfirmation.tsx#L144, there is no new string / type / API, and focusTrapSettings is web-only (a no-op on native). The same one change fixes the Split Manual tab too, since it embeds the same IOURequestStepConfirmation.

    Verified on web with the beta enabled: with the change the confirmation's manual trap reports isActive: false, and Tab now goes Merchant → … → Create expense → Back → Manual → Scan → body; the standalone confirmation, unchanged, still traps within its own header.

    What alternative solutions did you explore? (Optional)

    • Add the parent header to the confirmation's own trap, or register the body as an extra container on it: wrong layer — the embedded confirmation shouldn't know about the parent's header, and the outer trap already covers the body via its active-tab container. Only the competing inner trap needs to stand down.
    • Skip the confirmation's ScreenWrapper entirely when embedded (mirroring StepScreenWrapper.shouldShowWrapper): fixes the trap but also drops the keyboard-avoiding / offline / layout wrappers the confirmation body relies on. Disabling just the focus trap via focusTrapSettings is minimal.
    • Deactivate the outer page trap instead: its container set is the one that actually holds the Back button and tabs, so keeping it and dropping the redundant inner trap is the correct direction.
  11. added
    Help WantedApply this label when an issue is open to proposals by contributors
    on Aug 16, 2026
  12. abbasifaizan70 commented on Aug 16, 2026

    @abbasifaizan70
    Contributor

    Proposal

    Please re-state the problem that we are trying to solve in this issue.

    In the Create Expense flow, after opening the Manual tab (or the Split Expense Manual tab), pressing Tab repeatedly can never move focus to the header's Back button. The Back button is visible but permanently unreachable via keyboard navigation.

    What is the root cause of that problem?

    IOURequestStartPage deliberately builds one shared, multi-container focus trap so keyboard Tab cycling includes the header, the tab bar, and the active tab's content together as a single loop (so Tab from the last field wraps back around to the header's Back button):

    const [headerWithBackBtnContainerElement, setHeaderWithBackButtonContainerElement] = useState<HTMLElement | null>(null);
    const [tabBarContainerElement, setTabBarContainerElement] = useState<HTMLElement | null>(null);
    const [activeTabContainerElement, setActiveTabContainerElement] = useState<HTMLElement | null>(null);
    const focusTrapContainerElements = useMemo(() => {
    return [headerWithBackBtnContainerElement, tabBarContainerElement, activeTabContainerElement].filter((element) => !!element);
    }, [headerWithBackBtnContainerElement, tabBarContainerElement, activeTabContainerElement]);

    That array is passed down as focusTrapSettings.containerElements to the page's own ScreenWrapper, and the header is wrapped in a FocusTrapContainerElement so it becomes one of those containers:
    <ScreenWrapper
    shouldEnableKeyboardAvoidingView={isNewManualExpenseFlowEnabled}
    shouldEnableMaxHeight={selectedTab === CONST.TAB_REQUEST.PER_DIEM}
    shouldEnableMinHeight={canUseTouchScreen()}
    testID="IOURequestStartPage"
    focusTrapSettings={{containerElements: focusTrapContainerElements}}
    >
    {/* If the new manual expense flow is enabled, the confirmation screen is shown on the start page, so we do not want to disable the drag and drop provider in that case */}
    <DragAndDropProvider isDisabled={selectedTab !== CONST.TAB_REQUEST.SCAN && !(isNewManualExpenseFlowEnabled && selectedTab === CONST.TAB_REQUEST.MANUAL)}>
    <View style={styles.flex1}>
    <FocusTrapContainerElement
    onContainerElementChanged={setHeaderWithBackButtonContainerElement}
    style={[styles.w100]}
    >
    <HeaderWithBackButton
    title={tabTitles[iouType]}
    onBackButtonPress={navigateBack}
    />
    </FocusTrapContainerElement>

    For the Manual tab, this parent embeds IOURequestStepConfirmation directly (with shouldHideHeader to avoid a duplicate header) instead of using the gated StepScreenWrapper that Scan/Distance use:

    manualTabContent = (
    <IOURequestStepConfirmation
    route={route}
    navigation={navigation}
    shouldHideHeader
    />
    );

    IOURequestStepConfirmation unconditionally renders its own, separate <ScreenWrapper> with no focusTrapSettings at all — shouldHideHeader only skips rendering the visible inner <HeaderWithBackButton> a few hundred lines later, it does not affect the ScreenWrapper/focus-trap itself:

    <ScreenWrapper
    shouldEnableMaxHeight={canUseTouchScreen() && !isMobileSafari()}
    shouldAvoidScrollOnVirtualViewport={!isMobileSafari()}
    testID="IOURequestStepConfirmation"
    >

    {!shouldHideHeader && (
    <HeaderWithBackButton
    title={headerTitle}
    subtitle={hasMultipleTransactions ? `${currentTransactionIndex + 1} ${translate('common.of')} ${transactions.length}` : undefined}
    onBackButtonPress={navigateBack}
    /** Skip focus of the first interactive element in the header to make sure that Enter key submits the expense on the confirmation page instead of navigating back. */
    shouldSkipFocusAfterTransition
    >
    {hasMultipleTransactions ? (
    <PrevNextButtons
    isPrevButtonDisabled={currentTransactionIndex === 0}
    isNextButtonDisabled={currentTransactionIndex === transactions.length - 1}
    onNext={() => startTransition(showNextTransaction)}
    onPrevious={() => startTransition(showPreviousTransaction)}
    />
    ) : null}
    </HeaderWithBackButton>
    )}

    Every ScreenWrapper always wraps its children in FocusTrapForScreen, and when no containerElements are supplied it falls back to trapping only its own single wrapped DOM node:

    return (
    <FocusTrap
    active={isActive}
    paused={!isFocused}
    containerElements={focusTrapSettings?.containerElements?.length ? focusTrapSettings.containerElements : undefined}

    So mounting the embedded confirmation creates a second, independent focus-trap-react instance whose boundary is just the confirmation form — it never includes the outer header or tab bar.

    Both trap instances push onto the same sharedTrapStack used across the app. focus-trap's activateTrap pauses (detaches the Tab/keydown listeners of) whatever trap was previously active on the stack whenever a new trap activates on top of it. Because the inner confirmation trap mounts after the outer IOURequestStartPage trap, it becomes the sole active trap, silently pausing the outer, header-inclusive trap. From then on, Tab only cycles within the confirmation form's own boundary and can never reach the Back button — no matter how many times Tab is pressed.

    This explains why Scan and Distance don't reproduce it: those tabs render through StepScreenWrapper, which is explicitly gated with shouldShowWrapper so it skips creating its own ScreenWrapper/trap entirely when embedded fresh (no backTo, not editing):

    if (!shouldShowWrapper) {
    return <FullPageNotFoundView shouldShow={shouldShowNotFoundPage}>{children as ReactNode}</FullPageNotFoundView>;
    }

    shouldShowWrapper={!!backTo || isEditing}

    shouldShowWrapper={!isCreatingNewRequest}

    With no nested ScreenWrapper mounted, no second trap ever activates, so the outer trap (with the header included) stays active and Tab correctly reaches the Back button. IOURequestStepConfirmation has no equivalent gate — shouldHideHeader only hides the visual header, leaving the trap-creating ScreenWrapper always mounted.

    What changes do you think we should make in order to solve the problem?

    Follow the exact pattern that already works for Scan/Distance: when IOURequestStepConfirmation is embedded (shouldHideHeader is true), it should not stand up its own ScreenWrapper/focus trap at all — it should render its content directly and let the parent IOURequestStartPage's already-correct, header-inclusive trap remain the sole active trap.

    Original code:

    <ScreenWrapper
    shouldEnableMaxHeight={canUseTouchScreen() && !isMobileSafari()}
    shouldAvoidScrollOnVirtualViewport={!isMobileSafari()}
    testID="IOURequestStepConfirmation"
    >

    Change the IOURequestStepConfirmation render to conditionally skip the wrapper when embedded, mirroring StepScreenWrapper's shouldShowWrapper gate:

    const Wrapper = shouldHideHeader ? React.Fragment : ScreenWrapper;
    const wrapperProps = shouldHideHeader
        ? {}
        : {
              shouldEnableMaxHeight: canUseTouchScreen() && !isMobileSafari(),
              shouldAvoidScrollOnVirtualViewport: !isMobileSafari(),
              testID: 'IOURequestStepConfirmation',
          };
    return (
        <Wrapper {...wrapperProps}>
            {/* ...unchanged children... */}
        </Wrapper>
    );

    This is a minimal, targeted variant of the same gating already proven correct for Scan/Distance — it reuses the existing shouldHideHeader flag (no new prop needed) and doesn't touch focus-trap-react, sharedTrapStack, or any other shared infrastructure. An equally acceptable alternative that stays even closer to a one-line diff is passing focusTrapSettings={{active: false}} to this inner ScreenWrapper when shouldHideHeader is true, so it never activates a competing trap on sharedTrapStack, but skipping the wrapper entirely (as above) is preferable since it also avoids mounting a redundant FocusTrapForScreen/FocusTrap instance and any of ScreenWrapper's other side effects (safe-area handling, keyboard-avoiding view, etc.) for a screen that is purely embedded content.

    Edge cases:

    • Standalone confirmation (RHP): shouldHideHeader defaults to false everywhere except IOURequestStartPage's Manual tab (confirmed via IOURequestStepConfirmation's only other callers, ModalStackNavigators and SubmitExpenseOrchestrator, neither of which pass it). So the standalone confirmation screen keeps its own ScreenWrapper and header exactly as before — unaffected.
    • Split Expense (Manual tab): Uses the same embedded-confirmation code path (shouldHideHeader), so the fix applies there too, resolving the issue's second reported case.
    • Tab switching (Scan/Per diem → Manual): While the shared transaction draft is being reset, manualTabContent renders the ActivityIndicator branch instead of IOURequestStepConfirmation, so no trap is mounted in that transient state either way — unaffected.
    • Offline / loading states: The change only affects which component owns the ScreenWrapper/focus-trap wrapper, not data fetching or rendering logic inside the confirmation form, so offline and loading behavior are unchanged.
    • Non-web platforms (iOS/Android app): focus-trap-react and FocusTrapForScreen's web-only trap logic (index.web.tsx) don't apply to native, so this fix is a no-op there; native focus/back-button handling (useAndroidBackButtonHandler) is untouched.
    • Existing callers of IOURequestStepConfirmation: Only the render wrapper changes conditionally on the existing shouldHideHeader prop; all children, props, and behavior of the confirmation form itself are preserved for both embedded and standalone modes.
  13. 49 remaining items

  14. melvin-bot commented on Sep 2, 2026

    @melvin-bot

    @shubham1206agra

    The solution for this issue has been 🚀 deployed to production 🚀 in version 9.4.68-1 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:

    If no regressions arise, payment will be issued on 2026-09-09. 🎊

    The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the Contributor+ Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button]. If no checklist is needed for this issue, you can click: [no checklist button]

  15. melvin-bot commented on Sep 7, 2026

    @melvin-bot

    @shubham1206agra Eep! 4 days overdue now. Issues have feelings too...

  16. melvin-bot commented on Sep 8, 2026

    @melvin-bot

    Triggered auto assignment to @mallenexpensify (Awaiting Payment)

  17. melvin-bot commented on Sep 8, 2026

    @melvin-bot

    Payment Summary

    Resolving PRs:

    Upwork Job

    BugZero Checklist (@mallenexpensify)

    • I have confirmed assignees, roles, and Upwork contracts look correct
    • I have paid out Upwork contracts / manual NewDot requests
    • [BugZero Assignee] I have created a GH issue for creating/updating the regression test once above steps have been agreed upon
  18. shubham1206agra commented on Sep 9, 2026

    @shubham1206agra
    Contributor

    Contributor+ Checklist:

    Regression Test Proposal

    Test:

    1. Open any chat on web.
    2. Press Tab until the + button next to the composer is focused.
    3. Press Enter to open the menu.
    4. Press ↓ to highlight Create expense, press Enter (Manual tab selected).
    5. Press Tab repeatedly through the form.
    6. Verify that the focus reaches the Back button and the Manual / Scan tabs, and the cycle wraps back into the form.
    7. Repeat 1–6 with Split expense > Manual tab.
    8. Open the standalone confirmation (e.g. Scan flow > confirmation) and verify that the tab still stays within that screen as before.

    Do we agree 👍 or 👎

  19. mallenexpensify commented on Sep 10, 2026

    @mallenexpensify
    Contributor

    Payment Summary

    Contributor: @abbasifaizan70 paid $250 via Upwork
    Contributor+: @shubham1206agra due $250 via NewDot

    @abbasifaizan70 can you please accept the job below? Please reply here and tag me once you have.
    If you're not sent an offer in Upwork when you're assigned to an issue, please tag me. If an Upwork job exists, please submit a proposal.
    https://www.upwork.com/jobs/~022088524457309099662

  20. abbasifaizan70 commented on Sep 10, 2026

    @abbasifaizan70
    Contributor

    @mallenexpensify Offer accepted and submitted for payment. Thanks.

  21. mallenexpensify commented on Sep 10, 2026

    @mallenexpensify
    Contributor

    @abbasifaizan70 paid, summary updated above. Thx.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Awaiting PaymentAuto-added when associated PR is deployed to productionBugSomething is broken. Auto assigns a BugZero manager.DailyKSv2ExternalAdded to denote the issue can be worked on by a contributor

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions