Fix Web - User can't navigate through the autocomplete suggestion list using the keyboard#79684
Conversation
Codecov Report✅ Changes either increased or maintained existing code coverage, great job!
|
|
@annaweber830 please help merge main |
|
Hi @truph01 I merged |
|
@annaweber830 The PR includes a few changes that aren’t mentioned in your proposal. Could you explain the purpose of these additional changes? |
|
Hi @truph01 captureOnInputs controls whether arrow-key shortcuts still fire when the currently focused element is an editable control (, <textarea>, or contenteditable). App/src/libs/KeyboardShortcut/bindHandlerToKeydownEvent/index.ts Lines 34 to 36 in eafbcff Because the bug in #79102 happens while the cursor is in the composer input, and this block is exactly what decides whether any arrow-key handler runs when the keydown target is an editable element. So captureOnInputs is related because fixing #79102 requires the “right” handler (autocomplete navigation) to capture on inputs, and competing arrow-key handlers to not steal the event while the composer input is focused |
| }, | ||
| ...(!hasKeyBeenPressed.current && {setHasKeyBeenPressed}), | ||
| isFocused, | ||
| captureOnInputs: false, |
There was a problem hiding this comment.
@annaweber830 I encountered no issues when removing this line.
Could you provide a case where removing it could cause problems?
There was a problem hiding this comment.
Sorry If I removed this line, it doesn't work correctly.
Screen.Recording.2026-01-20.at.2.44.34.AM.mov
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppCan't use arrow key in this platform Android: mWeb ChromeScreen.Recording.2026-01-24.at.17.16.00.moviOS: HybridAppCan't use arrow key in this platform iOS: mWeb SafariScreen.Recording.2026-01-24.at.17.12.17.movMacOS: Chrome / SafariScreen.Recording.2026-01-24.at.17.09.01.mov |
|
Congrats, that's your 5th PR merged! 🎉 Do you know about the ContributorPlus role? It's an opportunity to earn more in the Expensify Open Source community. Keep up the great work - thanks! |
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🚀 Deployed to staging by https://github.com/Valforte in version: 9.3.10-0 🚀
|
|
🚀 Deployed to production by https://github.com/roryabraham in version: 9.3.10-6 🚀
|
Explanation of Change
Fix: Web - User can't navigate through the autocomplete suggestion list using the keyboard
Fixed Issues
$#79102
PROPOSAL:#79102 (comment)
Tests
Offline tests
Same as test
QA Steps
// TODO: These must be filled out, or the issue title must include "[No QA]."
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectioncanBeMissingparam foruseOnyxtoggleReportand notonIconClick)src/languages/*files and using the translation methodSTYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))npm run compress-svg)Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.ScrollViewcomponent to make it scrollable when more elements are added to the page.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
Screen.Recording.2026-01-15.at.6.26.40.AM.mov