Fix Discard Changes Modal, cannot discard changes using browser back button#76492
Fix Discard Changes Modal, cannot discard changes using browser back button#76492thienlnam merged 7 commits intoExpensify:mainfrom
Conversation
…button Signed-off-by: Tsaqif <tsaiinkwa@yahoo.com>
Codecov Report✅ Changes either increased or maintained existing code coverage, great job!
|
Signed-off-by: Tsaqif <tsaiinkwa@yahoo.com>
joekaufmanexpensify
left a comment
There was a problem hiding this comment.
Fix makes sense 👍
Signed-off-by: Tsaqif <tsaiinkwa@yahoo.com>
| isConfirmed.current = true; | ||
| setIsVisible(false); | ||
| // eslint-disable-next-line @typescript-eslint/no-deprecated | ||
| InteractionManager.runAfterInteractions(() => { |
There was a problem hiding this comment.
This change set removes that logic, which will cause issue #71945 to happen again.
CleanShot.2025-12-03.at.08.05.45.mp4
There was a problem hiding this comment.
test_d.mp4
@suneox I noticed there is some sluggishness only on the merchant page, and only when I discard the changes using Esc. So the issue happens specifically on the merchant page and only when dismissing the page with Esc.
Also, this sluggishness is different from the issue described in #71945
, where the merchant page slides back to the full left after almost closing. I will try to fixing this sluggishness issue.
There was a problem hiding this comment.
I just finished to record before and after your change
CleanShot.2025-12-03.at.08.33.46__2.mp4
There was a problem hiding this comment.
I will try to fix the issue
There was a problem hiding this comment.
After some testing, adding type="markdown" to the InputWrapper on the merchant page fixes the issue. I will investigate why the default text input type causes this problem.
Signed-off-by: Tsaqif <tsaiinkwa@yahoo.com>
|
@suneox When I use keyboard_flashing_issue.mp4So I'm using sluggish_animation_fix.mp4 |
|
@suneox this is ready for review again. Thanks |
|
@tsa321 The “confirm discard changes” functionality is broken on mWeb/Android when using the device back button. CleanShot.2025-12-05.at.01.14.03.mp4 |
|
@suneox for the |
|
@suneox I think this is related to the navigation component, which I’m afraid I’m not very familiar with. Should I try to fix the issue here, or should I create a follow-up PR for it? I think it’s a different issue, so a follow-up PR would be better. |
|
That seems fine, is there an existing issue for the search navigation bug? |
|
@thienlnam In production, the confirm-discard modal is not displayed when the user presses the browser back button: Bug video:test_d.mp4This happens because the transitionStart listener is never triggered: App/src/pages/iou/request/step/DiscardChangesConfirmation/index.tsx Lines 44 to 57 in ab58adc As a result, the confirm-discard modal does not appear at all. I don’t think this is caused by the search-navigation bug. The
This make this is essentially a more complex and different than the original issue. So I believe solving it on other issue/ PR will be better. What do you think, @thienlnam ? Thank you |
|
Yeah we can treat that as a separate issue (for the transitionStart limitation) |
|
cc @suneox Let's continue with the review, thanks |
|
@tsa321 This issue is resolved on both browser and mWeb after merging the latest main. Please update this PR with the latest main. |
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppCleanShot.2025-12-10.at.20.24.31.mp4Android: mWeb ChromeCleanShot.2025-12-10.at.20.23.33.mp4iOS: HybridAppCleanShot.2025-12-10.at.20.25.14.mp4iOS: mWeb SafariCleanShot.2025-12-10.at.19.56.28.mp4MacOS: Chrome / SafariCleanShot.2025-12-10.at.20.26.56.mp4 |
|
@suneox I have merged main |
|
cc @thienlnam for PR review, thank you |
|
✋ 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/thienlnam in version: 9.2.79-0 🚀
|
|
🚀 Deployed to staging by https://github.com/thienlnam in version: 9.2.81-0 🚀
|
|
🚀 Deployed to production by https://github.com/AndrewGable in version: 9.2.81-5 🚀
|
|
🚀 Deployed to production by https://github.com/AndrewGable in version: 9.2.81-5 🚀
|
Explanation of Change
Fixed Issues
$ #75014
PROPOSAL: #75014 (comment)
Tests
Discard changesOffline tests
QA Steps
// TODO: These must be filled out, or the issue title must include "[No QA]."
Discard changesPR 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
android_native_d.mp4
Android: mWeb Chrome
android_mweb_d.mp4
iOS: Native
ios_native_d.mp4
iOS: mWeb Safari
ios_msafari_d.mp4
MacOS: Chrome / Safari
macos_web_d.mp4