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
[Due for payment 2026-10-30] [$175] Chat - Unable to scroll PDF with keyboard after pressing right arrow key #104390
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:
Go to staging.new.expensify.com
Open any chat.
Upload a multi page PDF.
Open the PDF.
Press down key.
Press right arrow key.
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.
👋 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:
Identify the pull request that introduced this issue and revert it.
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.
[Contributor] The offending PR and associated issue have been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake.
[Contributor] If the regression was CRITICAL (e.g. interrupts a core flow) A discussion in #expensify-open-source has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner.
Link to discussion: N/A — non-critical.
[Contributor] If it was decided to create a regression test for the bug, please propose the regression test steps using the template below to ensure the same bug will not reach production again.
Regression Test Proposal
Precondition:
Desktop web; one chat with a single multi-page PDF and another with two multi-page PDFs.
Test:
Open the single PDF without clicking inside it. Press Down; verify the PDF scrolls.
Press Right, then Down; repeat with Left, then Down. Verify the PDF continues scrolling.
In the second chat, open the first PDF. Press Left, then Down; verify scrolling still works.
Press Right to open the second PDF. Verify Down scrolls it, including after pressing Right at the last attachment.
Press Left to return to the first PDF. Verify Down scrolls it and the background chat stays still.
Activity
applause-bot commentedon Oct 19, 2026
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
melvin-bot commentedon Oct 19, 2026
You have been assigned to this deploy blocker because you recently merged this PR: #103836
melvin-bot commentedon Oct 19, 2026
@inimaga @nyomanjyotisa you have been assigned to this deploy blocker because you reviewed the offending PR: #103836
melvin-bot commentedon Oct 19, 2026
💬 A slack conversation has been started in #expensify-open-source
github-actions commentedon Oct 19, 2026
👋 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:
MelvinBot commentedon Oct 19, 2026
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). BecauseisFocusednever changes, nothing focuses the scroller again.Recommended fix: In
CarouselActions.tsx, blur only when the carousel actually moves to another attachment. For example, havecycleThroughAttachmentsreturn 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
PDFView/index.tsx:225-237) runsfocusPDFScrollerWhenReady. 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.CarouselActions.tsx:10-20). Thatblur()predates this release. It only started to matter once the PDF scroller held focus..focus()in code doesn't set that point. This is also the production behavior..react-pdf__Document.Next Steps: Reply with
@MelvinBot implement thisto create a draft PR, or@MelvinBot <your feedback>to refine this analysis.view run
inimaga commentedon Oct 20, 2026
I agree with this assessment from Melvin. Going to demote.
@MelvinBot Implement this
19 remaining items
nyomanjyotisa commentedon Oct 24, 2026
Contributor+ Checklist:
[Contributor] The offending PR and associated issue have been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake.
Link to the comment on the PR: Focus the PDF scroller in the attachment modal so arrow keys scroll the PDF #103836 (comment)
Link to the comment on the Issue: [Due for payment 2026-10-27] [$175] Attachments - Chat scroll bar moves by arrow keys when PDF is opened #103576 (comment)
[Contributor] If the regression was CRITICAL (e.g. interrupts a core flow) A discussion in #expensify-open-source has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner.
Link to discussion: N/A — non-critical.
[Contributor] If it was decided to create a regression test for the bug, please propose the regression test steps using the template below to ensure the same bug will not reach production again.
Regression Test Proposal
Precondition:
Test:
Do we agree 👍 or 👎
melvin-bot commentedon Oct 29, 2026
Triggered auto assignment to @mallenexpensify (
Awaiting Payment)melvin-bot commentedon Oct 29, 2026
Payment Summary
Resolving PRs:
Keep the PDF focused when an arrow key can't move the attachment carousel #104449
Reviewer: @nyomanjyotisa owed $175 via NewDot
BugZero Checklist (@mallenexpensify)
mallenexpensify commentedon Nov 2, 2026
Payment Summary
Contributor+: @nyomanjyotisa due $175 via NewDot