Skip to content

Home - Home in the background scrolls when pressing arrow down on expense RHP #105410

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: 9.5.25-2
Reproducible in staging?: Yes
Reproducible in production?: No
If this was caught during regression testing, add the test name, ID and link from BrowserStack: #104836
Email or phone of affected tester (no customers): josdijniosjdojio@gmail.com
Issue reported by: Applause Internal Team
Bug source: Exploratory - Significant User Experience Deterioration
Device used: Mac 26.5 / Chrome
App Component: Money Requests

Action Performed:

  1. Go to staging.new.expensify.com
  2. Go to workspace chat.
  3. Create two expenses with the same amount and merchant.
  4. Go to Home.
  5. Click Review 2 expenses.
  6. Press arrow down on the keyboard.

Expected Result:

Home in the background will not scroll.

Actual Result:

Home in the background scrolls when pressing arrow down on expense RHP.

Workaround:

Unknown

Platforms:

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

Screenshots/Videos

Bug7299839_1793293465813.8.1.mp4

View all open jobs on GitHub

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

Activity

  1. added
    DeployBlockerCashThis issue or pull request should block deployment
    BugSomething is broken. Auto assigns a BugZero manager.
    on Oct 29, 2026
  2. applause-bot commented on Oct 29, 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/b471ea8112241270d44e81342e238b0c1d35bc76c0cc04b0d720484c872da97a

  3. melvin-bot commented on Oct 29, 2026

    @melvin-bot

    You have been assigned to this deploy blocker because you recently merged this PR: #104836

  4. melvin-bot commented on Oct 29, 2026

    @melvin-bot

    @arosiclair @Pujan92 you have been assigned to this deploy blocker because you reviewed the offending PR: #104836

  5. melvin-bot commented on Oct 29, 2026

    @melvin-bot

    💬 A slack conversation has been started in #expensify-open-source

  6. github-actions commented on Oct 29, 2026

    @github-actions
    Contributor

    👋 Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open `StagingDeployCash` deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:

    1. Identify the pull request that introduced this issue and revert it.
    2. Find someone who can quickly fix the issue.
    3. Fix the issue yourself.
  7. MelvinBot commented on Oct 29, 2026

    @MelvinBot
    Contributor

    Deploy Blocker Analysis

    Causing PR (high confidence): Use the left and right arrow keys to move between expenses on a report. The auto-assignment is correct.

    Root cause: That PR turns off composer auto-focus in the expense RHP when there is more than one expense to page through. Nothing inside the RHP gets focus, so focus falls back to document.body. The PR only handles Left and Right. Down falls through to the browser's default scroll, which scrolls the Home page behind the RHP.

    Recommendation: Revert. Revert Keep the expense arrow-key shortcuts active at the first and last expense first, then #104836. This also fixes the sibling blocker [$175] Expense - Report table in the background moves when pressing left or right arrow, which has the same cause. The revert should be clean on staging.

    Investigation details

    Mechanism

    1. "Review 2 expenses" on Home opens the first flagged expense in the RHP, with both expense IDs loaded for paging.
    2. The new hook useShouldSkipComposerAutoFocus.ts:26-33 returns true on web, outside the central Report screen, when there is more than one expense in the expense view. This disables the composer's initial focus and its refocus after a modal closes.
    3. When the RHP focus trap starts, it blurs the focused element (the Home button) and sets no initial focus (FocusTrapForScreen/index.web.tsx:41-57).
    4. Only ARROW_LEFT and ARROW_RIGHT are registered (MoneyRequestReportTransactionsNavigation.tsx:444-466). When the body has focus, Chrome and Safari scroll the last clicked scroll container, which is the Home page.
    5. In production, the composer takes focus when the RHP opens, so the arrow key only moves the text cursor.

    Why revert instead of fix

    • Keep the expense arrow-key shortcuts active at the first and last expense #105338 tried to patch the Left/Right version of this bug by swallowing those keys only. Up, Down, PageUp, PageDown, and Space still reach the background.
    • Blocking keys one by one would also break keyboard scrolling inside the RHP.
    • A proper fix is to move focus to a container inside the expense view (for example, tabIndex={-1}) when composer auto-focus is skipped. Then browser scrolling targets the RHP. This is not written or tested.

    Other staging PRs ruled out

    I traced this in code. I did not reproduce it in a browser.


    view run

  8. arosiclair commented on Oct 29, 2026

    @arosiclair
    Contributor

    I don't think this is a problem

  9. Pujan92 commented on Oct 29, 2026

    @Pujan92
    Contributor

    Same root cause as #105332. #104836 stopped auto-focusing the composer in the RHP expense view, and the RHP focus trap blurs the clicked element with no initial focus. Focus is left on body, so Up/Down/Space scroll whatever was last clicked: Home here, the report table in #105332.

    @arosiclair it is happening on prod too when composer isn't focused so not a blocker

    Screen.Recording.2026-10-29.at.23.32.26.mov
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

BugSomething is broken. Auto assigns a BugZero manager.EngineeringHourlyKSv2

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions