diff --git a/ios/Fabric/RNCSafeAreaViewComponentView.mm b/ios/Fabric/RNCSafeAreaViewComponentView.mm index 827fa4d..d622610 100644 --- a/ios/Fabric/RNCSafeAreaViewComponentView.mm +++ b/ios/Fabric/RNCSafeAreaViewComponentView.mm @@ -93,6 +93,12 @@ - (void)safeAreaProviderInsetsDidChange:(NSNotification *)notification - (void)updateStateIfNecessary { + // A view detached from the window (e.g. a screen covered by a react-native-screens + // native stack) reports zero safeAreaInsets, which would commit a zero-inset layout + // for the hidden screen. + if (self.window == nil) { + return; + } if (_providerView == nil) { return; }