Skip to content

Commit f697836

Browse files
sherginfacebook-github-bot
authored andcommitted
Fabric: Disabling ScrollView's contentOffset propagation to ShadowNode tree
Summary: This diff disables the feature that propagates ScrollView's content offset to ShadowNode hierarchy making measuring content-offset-aware. Seems that feature breaks FlatList because it does not expect measure calls to be content-offset-aware. We need to validate which legacy `measure*` calls should be content-offset-aware and which should not, and then verify that actual feature works (it's not clear why it worked with FlatList before) well before re-enabling this. For now, the most safer choice is to disable this feature because I don't think some call sites actually rely on it now. Changelog: [Internal] Fabric-specific internal change. Reviewed By: sammy-SC Differential Revision: D18777939 fbshipit-source-id: 20d6c1081e7d2cc3b5a7a172ed947a9ae9cdfaab
1 parent 4d9e5f8 commit f697836

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,13 +196,17 @@ - (ScrollViewMetrics)_scrollViewMetrics
196196

197197
- (void)_updateStateWithContentOffset
198198
{
199+
/*
200+
Propagation ScrollView's contentOffset value to ShadowNode tree is temporarily disabled.
201+
199202
auto contentOffset = RCTPointFromCGPoint(_scrollView.contentOffset);
200203
201204
_state->updateState([contentOffset](ScrollViewShadowNode::ConcreteState::Data const &data) {
202205
auto newData = data;
203206
newData.contentOffset = contentOffset;
204207
return newData;
205208
});
209+
*/
206210
}
207211

208212
- (void)prepareForRecycle

0 commit comments

Comments
 (0)