-
Notifications
You must be signed in to change notification settings - Fork 25k
fix: stale RCTModalHostViewController blocks touch inputs #54858
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
fix: stale RCTModalHostViewController blocks touch inputs #54858
Conversation
|
Danger change is failing due to non-related error: https://github.com/facebook/react-native/actions/runs/20138652296/job/57799224046 |
e8109aa to
68adedf
Compare
|
This also fixes the bug mentioned in #54781:
without introducing stacked modals or any breaking change. |
68adedf to
b16e101
Compare
cipolleschi
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the fix. It should be safe... but you'll never know with our internal apps and tests. 🤞
|
@cipolleschi has imported this pull request. If you are a Meta employee, you can view this in D90118522. |
|
NB: The failing workflow does not seem related to the changes:
|
|
Some internal comments from @javache : This should already be equivalent
Can we have a reproducer for this in RNTester? |
|
@cipolleschi IOS supports undimmed sheets. It's very possible to have a use-case where user will dismiss the modal when there's a UISheetPresentationController presented. Here's a duplicate PR I did for this issue #55005 |
Summary:
Resolves #54856
Resolves #50152
Fixes a but when
RCTModalHostViewControllertries to dismiss itself using the following code:But since it's already presenting another VC on top of it (e.g., login web view VC, photo picker VC, etc), it dismisses that view but not itself, which results in a transparent modal VC (all the UI is unmounted) that is the top VC blocking all touch input.
The change is minimal: instead of calling
dismissViewControllerAnimated:completion:onmodalViewController, which has two different behaviors depending on whether that VC is presenting another VC, it calls it onmodalViewController.presentingViewController, which has a unique behavior of dismissingmodalViewController.Changelog:
Test Plan: