Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

### 🐛 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))
- **Android**: A sheet whose keyboard starts rising as the present slide ends, such as one that focuses an input around `onWillPresent`, now finishes presenting. It used to never fire `onDidPresent` or resolve `present()`, and kept swallowing taps. ([#1012](https://github.com/lodev09/react-native-true-sheet/pull/1012) by [@JacquesLeupin](https://github.com/JacquesLeupin))
- **Android**: When a sheet presented over another sheet changes its content size right before it dismisses, the sheet behind it now slides back instead of staying pushed down and not draggable. ([#1015](https://github.com/lodev09/react-native-true-sheet/pull/1015) by [@idlework](https://github.com/idlework))
- **Android**: The keyboard no longer counts against `maxContentHeight`, as on iOS. A sheet now rises above the keyboard instead of stopping at `maxContentHeight` with the keyboard covering the bottom of its content, such as a button below a text input. A sheet already at `maxContentHeight` now rises with the keyboard too, instead of staying put. ([#1017](https://github.com/lodev09/react-native-true-sheet/pull/1017) by [@wildseansy](https://github.com/wildseansy))
Expand Down
6 changes: 6 additions & 0 deletions ios/TrueSheetViewController.mm
Original file line number Diff line number Diff line change
Expand Up @@ -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]]) {
Expand Down
Loading