Fix Page scrolls to the top after switching to landscape mode & entering number#87656
Conversation
|
Hey! I see that you made changes to our Form component. Make sure to update the docs in FORMS.md accordingly. Cheers! |
|
@codex review |
|
@Expensify/design could you take a look? There was a problem that when the big number pad was below the input then in landscape mode you had to scroll to get to some of the buttons and input was not visible when scrolled down. I changed the layout and moved the number pad to the right, ensuring that the text input has at least 400px width of space to make sure there are no overflows. This fixes one of the issues reported for this component. The layout may not be perfect, but I was focused on improving the current situation in any way by fixing the reported bug so I was just focused on making sure the input is always visible when using the number pad, we can later adjust the layout for all screens with number pads to make sure they all look fine Just to make sure, this layout change is only for the landscape mode, portrait mode is without any changes It was also reported as a bug that there is no auto focus on this input (no cursor visible on it after opening the screen with the input + number pad), so I enabled auto focus for this one only, as we decided to disable it for all inputs globally to make sure keyboard is not opening every time user navigates to a screen with an input. This one does not open a keyboard, so I think we can make an exception here |
Codecov Report❌ Looks like you've decreased code coverage for some files. Please write tests to increase, or at least maintain, the existing level of code coverage. See our documentation here for how to interpret this table.
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4bcd7d8d6b
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
|
@shawn got it! Updated the buttons:
|
|
Okay cool, let's see if the @Expensify/design is okay with that or if they prefer the larger buttons where we scroll the whole viewport. The larger buttons feel more friendly for accessibility so I wonder if that was the better path now... |
|
Slightly tough call! The bigger buttons are obviously more easy to tap, but using the smaller buttons makes the whole screen read better IMO. I would probably lean towards the smaller buttons, but I'm curious if @dubielzyk-expensify has any concerns with that. |
|
The smaller buttons still fit the minimum touch target so no a11y issues with it as long as we're not scaling them smaller than our small size. Just being aware that many different screen sizes so there's no guarantee of it being like that for everyone anyways. I think keeping them small to avoid isn't a bad shout. No feelings from me though |
|
Sounds good, thanks for the gut check. I say we roll with the smaller buttons then so it makes the page layout look better. |
|
@truph01 can you take a look? |
|
#87333 fixed here:
|
Sure, I am on it now |
|
@GCyganek Could you merge main? |
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppScreen.Recording.2026-04-16.at.15.29.20.movAndroid: mWeb ChromeiOS: HybridAppScreen.Recording.2026-04-16.at.15.45.32.moviOS: mWeb SafariMacOS: Chrome / Safari |
Done |
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🚧 @mjasikowski has triggered a test Expensify/App build. You can view the workflow run here. |
|
🧪🧪 Use the links below to test this adhoc build on Android, iOS, and Web. Happy testing! 🧪🧪
|
|
🚀 Deployed to staging by https://github.com/mjasikowski in version: 9.3.61-0 🚀
Bundle Size Analysis (Sentry): |
|
No help site changes are required for this PR. The changes are internal UI fixes for landscape mode on mobile (number pad button sizing, layout adjustments, and text input auto-focus behavior). They don't introduce new features, change any user-facing terminology, or alter documented workflows — the help articles describe expense creation at a high level and don't reference device orientation or number pad layout details. |
|
🚀 Deployed to production by https://github.com/marcaaron in version: 9.3.61-4 🚀
|





Explanation of Change
Allowing focus in landscape mode for
NumberWithSymbolFormtext input, adjusting the layout to make sure that key pad & text input are always visible together to fix the problem with auto scrolling to the input.Fixed Issues
$ #87364, #87314, #87333
PROPOSAL: N/A
Tests
Launch Expensify app in landscape mode.
Open FAB > Create expense > Manual.
Verify cursor will auto appear on amount input page in landscape mode.
Launch Expensify app in portrait mode.
Open FAB > Create expense > Manual.
Switch to landscape mode.
Tap any number.
Verify that there are no weird scroll behaviours
Launch Expensify app in landscape mode.
Open FAB > Create expense > Manual.
Without entering amount, tap Next.
Verify Amount error message appears below the amount, similar to portrait mode.
Offline tests
N/A
QA Steps
Same as Tests
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))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
Screen.Recording.2026-04-10.at.18.46.15.mov
iOS: Native
Screen.Recording.2026-04-10.at.18.45.27.mov