fix: Workspace - Keypad appears briefly on tapping back button to go back to Add field pg #78458
+6
−4
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Explanation of Change
Primary Fix (
src/utils/keyboard/index.android.ts):The original code bypassed waiting for the keyboard to hide on Android 16+, assuming the issue only affected older Android versions. However, this caused a new bug: when the modal closes, the TextInput unmounts while still focused, triggering a delayed keyboard dismissal that causes a visible flash.
The fix removes the
Platform.Version >= 36condition so all Android versions wait for the keyboard to fully hide before closing the modal.Secondary Fix (
src/components/TextPicker/TextSelectorModal.tsx):When waiting for the keyboard to hide,
Keyboard.dismiss()triggers a blur event which runs form validation, briefly showing "This field is required" error.Added an
isClosingstate that disables blur validation when the modal is closing, while preserving normal validation when the user clicks on empty space.Fixed Issues
$ #67945
PROPOSAL: #67945 (comment)
Tests
Offline tests
Same as tests
QA Steps
Same as tests
// 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
Screen.Recording.2025-12-25.at.1.22.06.in.the.afternoon.mov
Android: mWeb Chrome
Screen.Recording.2025-12-25.at.1.34.48.in.the.afternoon.mov
iOS: Native
Screen.Recording.2025-12-25.at.1.26.56.in.the.afternoon.mov
iOS: mWeb Safari
Screen.Recording.2025-12-25.at.1.27.54.in.the.afternoon.mov
MacOS: Chrome / Safari