Skip to content

Commit 8d0a2e7

Browse files
sammy-SCfacebook-github-bot
authored andcommitted
Stop subview clipping recursion at RCTScrollViewComponentView component
Summary: changelog: [internal] Prevent `RCTScrollViewComponentView`'s children from being clipped by stopping clipping recursion. Reviewed By: fkgozali Differential Revision: D31196948 fbshipit-source-id: 09548ade9cf993730784f544b565b9fde77a6ee4
1 parent 18697ad commit 8d0a2e7

File tree

1 file changed

+5
-9
lines changed

1 file changed

+5
-9
lines changed

React/Fabric/Mounting/ComponentViews/ScrollView/RCTScrollViewComponentView.mm

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -133,15 +133,6 @@ - (void)dealloc
133133
[self.scrollViewDelegateSplitter removeAllDelegates];
134134
}
135135

136-
- (void)layoutSubviews
137-
{
138-
[super layoutSubviews];
139-
140-
if (_subviewClippingEnabled) {
141-
[self _remountChildren];
142-
}
143-
}
144-
145136
- (RCTGenericDelegateSplitter<id<UIScrollViewDelegate>> *)scrollViewDelegateSplitter
146137
{
147138
return ((RCTEnhancedScrollView *)_scrollView).delegateSplitter;
@@ -611,6 +602,11 @@ - (void)scrollToEnd:(BOOL)animated
611602

612603
#pragma mark - Child views mounting
613604

605+
- (void)updateClippedSubviewsWithClipRect:(CGRect)clipRect relativeToView:(UIView *)clipView
606+
{
607+
// Do nothing. ScrollView manages its subview clipping individually in `_remountChildren`.
608+
}
609+
614610
- (void)_remountChildrenIfNeeded
615611
{
616612
CGPoint contentOffset = _scrollView.contentOffset;

0 commit comments

Comments
 (0)