Disable KeyboardAvoidingView while currency picker is open on amount step#89133
Disable KeyboardAvoidingView while currency picker is open on amount step#89133
Conversation
…step On native, the amount screen uses BigNumberPad (not the system keyboard), but its parent KeyboardAvoidingView still reacts to the global keyboard event from the currency picker's search field, causing the numpad to jump. Gating the prop on isCurrencyPickerVisible disables avoidance only while the picker is open — when the picker closes the keyboard is already gone, so re-enabling avoidance is safe. Co-authored-by: Aimane Chnaif <aimane-chnaif@users.noreply.github.com>
| shouldShowWrapper={!!backTo || isEditing} | ||
| includeSafeAreaPaddingBottom | ||
| shouldShowNotFoundPage={shouldShowNotFoundPage} | ||
| shouldEnableKeyboardAvoidingView={!isCurrencyPickerVisible} |
There was a problem hiding this comment.
@MelvinBot no need to avoid keyboard at all on this page.
On touchable devices, custom keypad is shown. On non-touchable devices, there's no virtual keyboard popup.
| shouldEnableKeyboardAvoidingView={!isCurrencyPickerVisible} | |
| shouldEnableKeyboardAvoidingView={false} |
There was a problem hiding this comment.
Applied! Set shouldEnableKeyboardAvoidingView={false} unconditionally since the custom keypad handles touchable devices and non-touchable devices keep input above the keyboard.
…t step
Co-authored-by: {"message":"Not Found","documentation_url":"https://docs.github.com/rest/issues/comments#get-an-issue-comment","status":"404"} <{"message":"Not Found","documentation_url":"https://docs.github.com/rest/issues/comments#get-an-issue-comment","status":"404"}@users.noreply.github.com>
|
🤖 Code Review — PR #89133 Change: Adds Verdict: The change looks correct and safe.
No regressions expected. 👍 |
Codecov Report✅ Changes either increased or maintained existing code coverage, great job!
|
|
Codex Review: Didn't find any major issues. Can't wait for the next one! ℹ️ About Codex in GitHubCodex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
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". |
|
There's a tiny jump on mobile web but I don't think this is blocker as this doesn't look bad and the bug was reported in native platforms. mchrome.movmsafari.mov |
|
@MelvinBot add Tests / QA Steps and complete author checklist with below: Screenshots/VideosAndroid: Nativeandroid.movAndroid: mWeb Chromemchrome.moviOS: Nativeios.moviOS: mWeb Safarimsafari.movMacOS: Chrome / Safariweb.mov |
|
Updated the PR body:
|
|
@MelvinBot feel free to check off all unchecked items in checklist even though they're not related. I verified them manually. |
|
Checked off all remaining checklist items as requested. |
|
@MelvinBot mark as ready for review |
|
Marked as ready for review! ✅ |
|
@aimane-chnaif 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] |
Reviewer Checklist
Screenshots/VideosAndroid: Nativeandroid.movAndroid: mWeb Chromemchrome.moviOS: Nativeios.moviOS: mWeb Safarimsafari.movMacOS: Chrome / Safariweb.mov |
|
@mountiny please generate adhoc build and verify fix on your iPhone |
Explanation of Change
On native (iOS/Android), the money request amount screen uses a custom
BigNumberPadinstead of the system keyboard. When the user opens the currency picker and focuses its search field, the system keyboard appears. The parentKeyboardAvoidingView(enabled by default inStepScreenWrapper) reacts to this global keyboard event and pushes the numpad upward. When the picker is dismissed, the numpad snaps back down, causing a visible jump.This PR disables the
KeyboardAvoidingViewentirely on the amount step by passingshouldEnableKeyboardAvoidingView={false}toStepScreenWrapper. On touchable devices the custom keypad is shown (no system keyboard), and on non-touchable devices the input is always shown above the keyboard — so keyboard avoidance is unnecessary on this page.Fixed Issues
$ #88913
Tests
Offline tests
N/A — this change only affects keyboard avoidance layout behavior, no network dependency.
QA Steps
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
android.mov
Android: mWeb Chrome
mchrome.mov
iOS: Native
ios.mov
iOS: mWeb Safari
msafari.mov
MacOS: Chrome / Safari
web.mov