diff --git a/packages/react-native/React/Fabric/Mounting/ComponentViews/Modal/RCTModalHostViewComponentView.mm b/packages/react-native/React/Fabric/Mounting/ComponentViews/Modal/RCTModalHostViewComponentView.mm index e20eee608a01c6..b0908cd98df32f 100644 --- a/packages/react-native/React/Fabric/Mounting/ComponentViews/Modal/RCTModalHostViewComponentView.mm +++ b/packages/react-native/React/Fabric/Mounting/ComponentViews/Modal/RCTModalHostViewComponentView.mm @@ -165,7 +165,10 @@ - (void)ensurePresentedOnlyIfNeeded // To animate dismissal of view controller, snapshot of // view hierarchy needs to be added to the UIViewController. UIView *snapshot = _modalContentsSnapshot; - [self.viewController.view addSubview:snapshot]; + + if (_shouldPresent) { + [self.viewController.view addSubview:snapshot]; + } [self dismissViewController:self.viewController animated:_shouldAnimatePresentation @@ -194,7 +197,7 @@ - (void)ensurePresentedOnlyIfNeeded - (void)mountingTransactionWillMount:(const MountingTransaction &)transaction withSurfaceTelemetry:(const facebook::react::SurfaceTelemetry &)surfaceTelemetry { - _modalContentsSnapshot = [self.viewController.view snapshotViewAfterScreenUpdates:NO]; + _modalContentsSnapshot = [self.viewController.view snapshotViewAfterScreenUpdates:YES]; } #pragma mark - UIView methods