File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -804,17 +804,18 @@ - (void)willMoveToWindow:(UIWindow *)newWindow
804804 // To avoid glitches resulting from clicking buttons mid transition, we temporarily disable all interactions
805805 // Disabling interactions for parent navigation controller won't be enough in case of nested stack
806806 // Furthermore, a stack put inside a modal will exist in an entirely different hierarchy
807- // To be sure, we block interactions on the whole window.
808- // Note that newWindows is nil when moving from instead of moving to, and Obj-C handles nil correctly
809- [RNSScreenView.viewInteractionManagerInstance disableInteractionsForSubtreeWith: self ];
807+
808+ // Use RNSViewInteractionManager util to find a suitable subtree to disable interations on,
809+ // starting from reactSuperview, because on Paper, self is not attached yet.
810+ [RNSScreenView.viewInteractionManagerInstance disableInteractionsForSubtreeWith: self .reactSuperview];
810811 }
811812}
812813
813814- (void )presentationControllerWillDismiss : (UIPresentationController *)presentationController
814815{
815816 if (@available (iOS 26 , *)) {
816817 // Disable interactions to disallow multiple modals dismissed at once; see willMoveToWindow
817- [RNSScreenView.viewInteractionManagerInstance disableInteractionsForSubtreeWith: self ];
818+ [RNSScreenView.viewInteractionManagerInstance disableInteractionsForSubtreeWith: self .reactSuperview ];
818819 }
819820
820821#if !RCT_NEW_ARCH_ENABLED
You can’t perform that action at this time.
0 commit comments