Skip to content

Commit

Permalink
Create react-native+0.63.4.patch
Browse files Browse the repository at this point in the history
  • Loading branch information
kanzitelli committed Dec 20, 2020
1 parent 815c4a8 commit 28d0cf5
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions patches/react-native+0.63.4.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
diff --git a/node_modules/react-native/React/Views/ScrollView/RCTScrollContentView.m b/node_modules/react-native/React/Views/ScrollView/RCTScrollContentView.m
index cf6a0b1..4d187db 100644
--- a/node_modules/react-native/React/Views/ScrollView/RCTScrollContentView.m
+++ b/node_modules/react-native/React/Views/ScrollView/RCTScrollContentView.m
@@ -14,13 +14,20 @@

@implementation RCTScrollContentView

+- (void)didMoveToWindow
+{
+ [super didMoveToWindow];
+ RCTScrollView *scrollView = (RCTScrollView *)self.superview.superview;
+ [scrollView updateContentOffsetIfNeeded];
+}
+
- (void)reactSetFrame:(CGRect)frame
{
[super reactSetFrame:frame];

RCTScrollView *scrollView = (RCTScrollView *)self.superview.superview;

- if (!scrollView) {
+ if (!scrollView || !self.window) {
return;
}

0 comments on commit 28d0cf5

Please sign in to comment.