Skip to content

Commit 6cb2684

Browse files
sammy-SCkkafar
authored andcommitted
fix modal becoming unresponsive with PullToRefresh
Summary: ## Changelog: [iOS] [Fixed] - Fix app becoming unresponsive when RefreshControl is used inside of <Modal /> Fixes: facebook#48579 This is a UIKit bug. Switching to `didMoveToSuperview` resolves it. Reviewed By: cipolleschi Differential Revision: D68025099 fbshipit-source-id: 5d5e730f002ca93748674655a8393b770dc11611 Co-authored-by: kkafar <[email protected]>
1 parent cc4e4c7 commit 6cb2684

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

packages/react-native/React/Fabric/Mounting/ComponentViews/ScrollView/RCTPullToRefreshViewComponentView.mm

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -144,10 +144,10 @@ - (void)_updateTitle
144144

145145
#pragma mark - Attaching & Detaching
146146

147-
- (void)didMoveToWindow
147+
- (void)didMoveToSuperview
148148
{
149-
[super didMoveToWindow];
150-
if (self.window) {
149+
[super didMoveToSuperview];
150+
if (self.superview) {
151151
[self _attach];
152152
} else {
153153
[self _detach];

0 commit comments

Comments
 (0)