iOS: Fix Expense discard changes modal hidden behind keyboard#82097
iOS: Fix Expense discard changes modal hidden behind keyboard#82097marufsharifi wants to merge 1 commit intoExpensify:mainfrom
Conversation
…den behind the iOS keyboard.
Codecov Report✅ Changes either increased or maintained existing code coverage, great job!
|
|
@ZhenjaHorbach 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] |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 5a85bcf7f5
ℹ️ About Codex in GitHub
Your team has set up Codex to 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 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| onCancel={() => { | ||
| setIsVisible(false); | ||
| setModalVisible(false); | ||
| blockedNavigationAction.current = undefined; | ||
| }} |
There was a problem hiding this comment.
Call the cancel callback on native modal dismiss
The native discard-confirmation component now drives editable={!isDiscardModalVisible} in the merchant/description steps, which dismisses the keyboard when the modal opens, but its onCancel path never invokes the onCancel prop to re-focus the input. On iOS/Android, canceling the discard dialog therefore leaves the user on the same screen with the keyboard closed and no restored focus, so continuing to edit requires an extra tap (a regression from the previous flow where focus was preserved).
Useful? React with 👍 / 👎.
Explanation of Change
When users on iOS swipe back from the Description or Merchant step with unsaved edits, the discard confirmation now stays fully visible and is no longer covered by the keyboard.
Fixed Issues
$ #78590
PROPOSAL: #78590 (comment)
Tests
Offline tests
Same as the tests.
QA Steps
Same as the 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.2026-02-12.at.9.56.45.AM.mov
Android: mWeb Chrome
Screen.Recording.2026-02-12.at.9.58.32.AM.mov
iOS: Native
Screen.Recording.2026-02-13.at.12.50.15.PM.mov
iOS: mWeb Safari
Screen.Recording.2026-02-13.at.12.53.32.PM.mov
MacOS: Chrome / Safari