From 3cf58c70e4dc246402a2f25c70b57461705a90ea Mon Sep 17 00:00:00 2001 From: Jacques Leupin Date: Tue, 10 Nov 2026 12:16:49 -0800 Subject: [PATCH 1/2] fix(ios): present a modal opened while the sheet is dismissing 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. --- ios/TrueSheetViewController.mm | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/ios/TrueSheetViewController.mm b/ios/TrueSheetViewController.mm index 5041ef8f..934afe4f 100644 --- a/ios/TrueSheetViewController.mm +++ b/ios/TrueSheetViewController.mm @@ -2345,6 +2345,12 @@ - (BOOL)isDismissible { } - (UIViewController *)newPresentingViewController { + // A dismissing sheet can't present, and react-native-screens stops updating its modals when handed one. + // Returning nil makes it present from its own controller, which UIKit queues until this dismissal ends. + if (self.isBeingDismissed) { + return nil; + } + UIViewController *topmost = self; while (topmost.presentedViewController != nil && !topmost.presentedViewController.isBeingDismissed && [topmost.presentedViewController isKindOfClass:[TrueSheetViewController class]]) { From 1de031d0f63ce49f1f5c5c0ca1df2602c65382d1 Mon Sep 17 00:00:00 2001 From: Jacques Leupin Date: Tue, 10 Nov 2026 13:51:29 -0800 Subject: [PATCH 2/2] docs: add changelog entry for #1019 --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index a868a370..57c3d128 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ ## Unreleased +### 🐛 Bug fixes + +- **iOS**: Navigating to a modal screen while the sheet is dismissing now opens the modal once the sheet is gone. With the patched `react-native-screens`, the modal never opened and no other modal could open until the app restarted. ([#1019](https://github.com/lodev09/react-native-true-sheet/pull/1019) by [@JacquesLeupin](https://github.com/JacquesLeupin)) + ### 💡 Others - The Expo example in `example/expo` now runs SDK 58, and the SDK 57 example moves to `example/expo-57` (`yarn expo-57`). The bare example is upgraded to React Native 0.88. ([#1016](https://github.com/lodev09/react-native-true-sheet/pull/1016) by [@lodev09](https://github.com/lodev09))