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-09-14] [$250] TC-3707 - Arrows not working on emoji reaction menu #97442
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
⚠️Medium confidence — the mechanism is clear from the code, but the exact competing handler needs one runtime check to pin down (see the note at the end).
What is the root cause of that problem?
Emoji-picker arrow navigation is not driven by DOM focus — it's driven by App's global, document-level keyboard-shortcut dispatcher. The picker registers ARROW_UP/DOWN/LEFT/RIGHT via useArrowKeyFocusManager → useKeyboardShortcut, which pushes onto a priority stack where only the top handler for a key runs and the event does not bubble to lower subscribers (bindHandlerToKeydownEvent/index.ts:33-66 — .every() stops after the first non-bubbling handler).
When you open the picker by tabbing to a message's reaction button, the reaction lives inside a report-action context menu that is deliberately kept mounted: the open path calls openContextMenu() → setShouldKeepOpen(true) (ContextMenuActions.tsx:456-472). That keeps the context menu's own arrow-key subscriber active — shouldEnableArrowNavigation = !isMini && (isVisible || shouldKeepOpen) (BaseReportActionContextMenu.tsx:288) — sitting on the arrow stack alongside the picker's handler. Arrow keys are consumed by the top subscriber and never reach the picker, so focusedIndex never changes and no emoji highlights. Tab/Shift+Tab keep working because those go through the picker's independent DOM focus trap (FocusTrapForModal), not the shortcut stack — which is exactly the reported symptom (tab works, arrows don't).
What changes do you think we should make in order to solve the problem?
Ensure the context-menu arrow-key subscriber is not active while the emoji picker is open on the tab-to-reaction path, so the picker's handler is the top-of-stack subscriber for the arrow keys. Options:
Suppress the kept-open context menu's arrow navigation while an emoji picker is showing (gate shouldEnableArrowNavigation on the picker not being open), or
Have the picker register its arrow handlers at a higher priority so they land on top of the stack while it is open.
Either way the picker's useArrowKeyFocusManager (EmojiPickerMenu/index.tsx:161-173) must be the receiver of arrow keydowns whenever the picker is visible.
Investigation details & what to verify at runtime
Arrow handlers gate only on isFocused/allowHorizontalArrowKeys (useArrowKeyFocusManager.ts:113-114,193-194); up/down are effectively ungated here, so the picker's own config does not explain up/down also dying — pointing at stack ordering rather than the picker's gating.
The composer being focused is ruled out: the picker excludes only TEXTAREA with captureOnInputs: true, but the composer is a contentEditable DIV and the search box an INPUT, so neither would block the picker's handler.
Runtime check to confirm the exact culprit: reproduce the tab-to-reaction flow on Windows Chrome, and when arrows fail inspect eventHandlers['ARROWDOWN'] in src/libs/KeyboardShortcut/index.ts — confirm a BaseReportActionContextMenu handler sits above the picker's — and confirm shouldEnableArrowNavigation/shouldKeepOpen are true while the picker is open.
What alternative solutions did you explore? (Optional)
Rather than reordering the stack, allow the arrow event to bubble past the context-menu handler when the picker is open (return shouldBubble from the context menu's arrow handler in that state).
Next Steps for Contributor+ team: To accept:@MelvinBot implement [this](https://github.com/Expensify/App/issues/97442) to create a draft PR. To refine:@MelvinBot <your feedback> To reject: Explain why you are rejecting Melvin's proposal.
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
Activity
applause-bot commentedon Jul 30, 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/4a44344ce3c8d5448a10532b75d2bcf66eb8fe4ae2a38a87272ab413a76028d8
MelvinBot commentedon Jul 30, 2026
Proposal
What is the root cause of that problem?
Emoji-picker arrow navigation is not driven by DOM focus — it's driven by App's global, document-level keyboard-shortcut dispatcher. The picker registers
ARROW_UP/DOWN/LEFT/RIGHTviauseArrowKeyFocusManager→useKeyboardShortcut, which pushes onto a priority stack where only the top handler for a key runs and the event does not bubble to lower subscribers (bindHandlerToKeydownEvent/index.ts:33-66—.every()stops after the first non-bubbling handler).When you open the picker by tabbing to a message's reaction button, the reaction lives inside a report-action context menu that is deliberately kept mounted: the open path calls
openContextMenu()→setShouldKeepOpen(true)(ContextMenuActions.tsx:456-472). That keeps the context menu's own arrow-key subscriber active —shouldEnableArrowNavigation = !isMini && (isVisible || shouldKeepOpen)(BaseReportActionContextMenu.tsx:288) — sitting on the arrow stack alongside the picker's handler. Arrow keys are consumed by the top subscriber and never reach the picker, sofocusedIndexnever changes and no emoji highlights.Tab/Shift+Tabkeep working because those go through the picker's independent DOM focus trap (FocusTrapForModal), not the shortcut stack — which is exactly the reported symptom (tab works, arrows don't).What changes do you think we should make in order to solve the problem?
Ensure the context-menu arrow-key subscriber is not active while the emoji picker is open on the tab-to-reaction path, so the picker's handler is the top-of-stack subscriber for the arrow keys. Options:
shouldEnableArrowNavigationon the picker not being open), orEither way the picker's
useArrowKeyFocusManager(EmojiPickerMenu/index.tsx:161-173) must be the receiver of arrow keydowns whenever the picker is visible.Investigation details & what to verify at runtime
isFocused/allowHorizontalArrowKeys(useArrowKeyFocusManager.ts:113-114,193-194); up/down are effectively ungated here, so the picker's own config does not explain up/down also dying — pointing at stack ordering rather than the picker's gating.TEXTAREAwithcaptureOnInputs: true, but the composer is a contentEditableDIVand the search box anINPUT, so neither would block the picker's handler.eventHandlers['ARROWDOWN']insrc/libs/KeyboardShortcut/index.ts— confirm aBaseReportActionContextMenuhandler sits above the picker's — and confirmshouldEnableArrowNavigation/shouldKeepOpenaretruewhile the picker is open.What alternative solutions did you explore? (Optional)
Rather than reordering the stack, allow the arrow event to bubble past the context-menu handler when the picker is open (return
shouldBubblefrom the context menu's arrow handler in that state).Next Steps for Contributor+ team:
To accept:
@MelvinBot implement [this](https://github.com/Expensify/App/issues/97442)to create a draft PR.To refine:
@MelvinBot <your feedback>To reject: Explain why you are rejecting Melvin's proposal.
melvin-bot commentedon Jul 30, 2026
Triggered auto assignment to Contributor-plus team member for initial proposal review - @FitseTLT (
External)melvin-bot commentedon Jul 30, 2026
Job added to Upwork: https://www.upwork.com/jobs/~022082757399178743317
melvin-bot commentedon Aug 4, 2026
@FitseTLT Huh... This is 4 days overdue. Who can take care of this?
FitseTLT commentedon Aug 5, 2026
reviewing
FitseTLT commentedon Aug 5, 2026
🆘 C+ Help Wanted
76 remaining items
melvin-bot commentedon Sep 13, 2026
Triggered auto assignment to @mallenexpensify (
Awaiting Payment)melvin-bot commentedon Sep 14, 2026
Payment Summary
Resolving PRs:
Upwork Job
BugZero Checklist (@mallenexpensify)
mallenexpensify commentedon Sep 16, 2026
Payment Summary
Contributor: @samranahm paid $250 via Upwork
Contributor+: @FitseTLT due $250 via NewDot
flaviadefaria commentedon Sep 22, 2026
Approved: @FitseTLT due $250 via NewDot