fix: prevent parent view scroll when press space bar and arrow#56435
Conversation
|
@DylanDylann Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
|
I've updated and replied to the review change. |
As my checking, we only use shouldUseScrollView as true in 3 places: SearchTypeMenuNarrow, AccountSwitcher, VideoPopoverMenu @linhvovan29546 Could you check 3 places to see whether we can always prevent scrolling when clicking the space button? |
|
If yes, we can remove scrollableElement.scrollBy function in here |
…hen-press-space-bar
FYI, after merging the main branch, I noticed that the navigation has significantly changed and was broken by previous code. I am rechecking it |
@DylanDylann My bad, after checking, I think we can call e.preventDefault only when shouldUseScrollView is false. |
|
I've updated it. The change in the |
|
First, could you explain again why do we need to add scrollEnabled |
You can add
|
|
@linhvovan29546 Why do you log on InitialSettingsPage? We need to use scrollEnabled={isFocused} in ProfilePage Screen.Recording.2025-02-14.at.16.01.35.mov |
I answered the question, |
|
For me, InitialSettingsPage isn't scrolled down when entering space |
Thanks, I'll update |
|
@linhvovan29546 Please review all your changes again and ping me when everything is ready |
|
@DylanDylann This is ready. Thank you for your review! 👍 |
Reviewer Checklist
Screenshots/VideosAndroid: NativeScreen.Recording.2025-02-16.at.16.33.45.movAndroid: mWeb ChromeScreen.Recording.2025-02-16.at.16.32.44.moviOS: NativeScreen.Recording.2025-02-16.at.16.33.45.moviOS: mWeb SafariScreen.Recording.2025-02-16.at.16.29.24.movMacOS: Chrome / SafariScreen.Recording.2025-02-16.at.16.27.08.movMacOS: DesktopScreen.Recording.2025-02-16.at.16.30.26.mov |
|
Just a heads up, I'm OOO this week but will take a look when I have a moment! |
…hen-press-space-bar
…hen-press-space-bar
…hen-press-space-bar
|
✋ 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/dangrous in version: 9.1.6-0 🚀
|
|
🚀 Deployed to staging by https://github.com/dangrous in version: 9.1.6-0 🚀
|
|
🚀 Deployed to production by https://github.com/chiragsalian in version: 9.1.6-1 🚀
|


Explanation of Change
Fixed Issues
$ #55832
PROPOSAL: #55832 (comment)
Tests
Precond: User has a long Workspace list
Precond: User has a long list
We can apply this test to other lists as well
Offline tests
Same Test above
QA Steps
Same Test above
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)src/languages/*files and using the translation methodSTYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))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
This change only apply for web and desktop
Android: mWeb Chrome
Screen.Recording.2025-02-10.at.8.52.20.PM.mov
iOS: Native
This change only apply for web and desktop
iOS: mWeb Safari
Screen.Recording.2025-02-10.at.7.14.19.PM.mov
MacOS: Chrome / Safari
Screen.Recording.2025-02-06.at.7.41.49.AM.mov
Screen.Recording.2025-02-06.at.7.44.16.AM.mov
Screen.Recording.2025-02-06.at.7.44.51.AM.mov
MacOS: Desktop
Screen.Recording.2025-02-06.at.7.48.23.AM.mov