Skip to content

[Due for payment 2026-10-30] [$175] Chat - Unable to scroll PDF with keyboard after pressing right arrow key #104390

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.14-0
Reproducible in staging?: Yes
Reproducible in production?: N/A - new feature, doesn't exist in prod
If this was caught during regression testing, add the test name, ID and link from BrowserStack: #103836
Email or phone of affected tester (no customers): jsoidjndoiniodnsjojd@gmail.com
Issue reported by: Applause Internal Team
Bug source: Exploratory - Significant User Experience Deterioration
Device used: Mac 26.5 / Chrome
App Component: Chat Report View

Action Performed:

  1. Go to staging.new.expensify.com
  2. Open any chat.
  3. Upload a multi page PDF.
  4. Open the PDF.
  5. Press down key.
  6. Press right arrow key.
  7. Press down key.

Expected Result:

PDF will remain scrollable after pressing down key.

Actual Result:

PDF is not scrollable after pressing down key.
This issue does not happen when user clicks on the PDF first and pressing right arrow key, the PDF remains scrollable.

Workaround:

Unknown

Platforms:

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

Screenshots/Videos

Bug7290509_1792433535346.3.mp4

View all open jobs on GitHub

Applause Internal Information
Exported by: Svetlana Lazutkina
Bug ID: 7290509

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

Activity

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

  3. melvin-bot commented on Oct 19, 2026

    @melvin-bot

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

  4. melvin-bot commented on Oct 19, 2026

    @melvin-bot

    @inimaga @nyomanjyotisa you have been assigned to this deploy blocker because you reviewed the offending PR: #103836

  5. melvin-bot commented on Oct 19, 2026

    @melvin-bot

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

  6. github-actions commented on Oct 19, 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 19, 2026

    @MelvinBot
    Contributor

    Deploy Blocker Analysis

    Causing PR: Focus the PDF scroller in the attachment modal so arrow keys scroll the PDF (high confidence).

    Recommendation: demote and fix forward. Don't revert. This isn't a regression from production. In production, arrow keys never scroll the PDF unless you click it first. On staging, they work until you press Left or Right. After that, behavior matches production. Reverting would bring back [$175] Attachments - Chat scroll bar moves by arrow keys when PDF is opened in every case.

    Root cause: The PR focuses the PDF scroller only once, when the PDF opens. The carousel's arrow-key handler then calls event.target.blur() (CarouselActions.tsx:22-32). The focused element is now the PDF scroller, so pressing Right removes its focus. With one attachment, or on the last one, the carousel doesn't move (AttachmentCarouselView/index.tsx:133-135). Because isFocused never changes, nothing focuses the scroller again.

    Recommended fix: In CarouselActions.tsx, blur only when the carousel actually moves to another attachment. For example, have cycleThroughAttachments return whether it scrolled. When the user comes back to the PDF, the PDFView effect focuses the scroller again. Add a test: pressing Left or Right on a single or last attachment keeps the PDF scroller focused.

    Investigation details
    • The PR's effect (PDFView/index.tsx:225-237) runs focusPDFScrollerWhenReady. If the scroller already exists, that function focuses it and returns (focusPDFScrollerWhenReady.ts:26-36). After that, nothing watches for focus loss. This is why the first Down press scrolls.
    • The Left-arrow handler blurs the same way (CarouselActions.tsx:10-20). That blur() predates this release. It only started to matter once the PDF scroller held focus.
    • Why clicking first works: The blur still happens. But when nothing has focus, Chrome sends arrow-key scrolling to the scrollable area that was last clicked, which is the PDF. Calling .focus() in code doesn't set that point. This is also the production behavior.
    • Other PRs checked: No other PR in the current deploy checklist touches web PDF focus or carousel keyboard handling.
    • Alternative fix: Skip the blur when the target is inside .react-pdf__Document.

    Next Steps: Reply with @MelvinBot implement this to create a draft PR, or @MelvinBot <your feedback> to refine this analysis.


    view run

  8. inimaga commented on Oct 20, 2026

    @inimaga
    Contributor

    I agree with this assessment from Melvin. Going to demote.

    @MelvinBot Implement this

  9. 19 remaining items

  10. nyomanjyotisa commented on Oct 24, 2026

    @nyomanjyotisa
    Member

    Contributor+ Checklist:

    Regression Test Proposal

    Precondition:

    • Desktop web; one chat with a single multi-page PDF and another with two multi-page PDFs.

    Test:

    1. Open the single PDF without clicking inside it. Press Down; verify the PDF scrolls.
    2. Press Right, then Down; repeat with Left, then Down. Verify the PDF continues scrolling.
    3. In the second chat, open the first PDF. Press Left, then Down; verify scrolling still works.
    4. Press Right to open the second PDF. Verify Down scrolls it, including after pressing Right at the last attachment.
    5. Press Left to return to the first PDF. Verify Down scrolls it and the background chat stays still.

    Do we agree 👍 or 👎

  11. added
    Awaiting PaymentAuto-added when associated PR is deployed to production
    and removed on Oct 24, 2026
  12. melvin-bot commented on Oct 29, 2026

    @melvin-bot

    Triggered auto assignment to @mallenexpensify (Awaiting Payment)

  13. melvin-bot commented on Oct 29, 2026

    @melvin-bot

    Payment Summary

    Resolving PRs:

    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
  14. mallenexpensify commented on Nov 2, 2026

    @mallenexpensify
    Contributor

    Payment Summary

    Contributor+: @nyomanjyotisa due $175 via NewDot

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.DailyKSv2Engineering

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions