Repository navigation
fix(ios): present a modal opened while the sheet is dismissing - #1019
Merged
lodev09 merged 3 commits intoNov 16, 2026
Merged
Conversation
newPresentingViewController returned the sheet even while it was being dismissed. With the react-native-screens patch from the navigation guide, the stack took it as the presenter, bailed out because it was being dismissed, and never released its modal update lock, so no modal could open until the app restarted.
|
@JacquesLeupin is attempting to deploy a commit to the lodev09 Team on Vercel. A member of the Team first needs to authorize it. |
…heet-dismissing # Conflicts: # CHANGELOG.md
lodev09
approved these changes
Nov 16, 2026
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Fixes #1018.
With the
react-native-screenspatch, navigating to a modal while a sheet is dismissing left the stack unable to present any modal until the app restarted.newPresentingViewControllerreturned the sheet even while it was being dismissed.react-native-screensmade it the presenter, sawbeingDismissed, and returned without releasing its update lock. It now returnsnilin that case, so the stack presents from its own controller, and UIKit queues that presentation until the dismissal ends.Type of Change
Test Plan
Repro app from #1018 on an iPhone 17 Pro simulator (iOS 27.0), with RN 0.88.1 and
react-native-screens4.30.1 plus the patch. Tested as 4.1.0 with this change applied;mainhas the same iOS sources as 4.1.0.dismiss()thennavigate('Modal')Navigating to a modal from a sheet that stays open still presents it over the sheet.
Not tested: a drag-to-dismiss that gets cancelled after the modal was requested.
Screenshots / Videos
Checklist