From 65972dd6fb1e7a2b78fdeefc0813acb94cb986eb Mon Sep 17 00:00:00 2001 From: Samuel Newman Date: Wed, 7 Oct 2026 16:10:07 +0300 Subject: [PATCH] Fix iOS maintainVisibleContentPosition skipping a clipped anchor Co-Authored-By: Claude Opus 5.5 (1M context) --- .../ComponentViews/ScrollView/RCTScrollViewComponentView.mm | 6 ------ 1 file changed, 6 deletions(-) diff --git a/packages/react-native/React/Fabric/Mounting/ComponentViews/ScrollView/RCTScrollViewComponentView.mm b/packages/react-native/React/Fabric/Mounting/ComponentViews/ScrollView/RCTScrollViewComponentView.mm index ffd10bc6f236..8340405e0364 100644 --- a/packages/react-native/React/Fabric/Mounting/ComponentViews/ScrollView/RCTScrollViewComponentView.mm +++ b/packages/react-native/React/Fabric/Mounting/ComponentViews/ScrollView/RCTScrollViewComponentView.mm @@ -1111,12 +1111,6 @@ - (void)_adjustForMaintainVisibleContentPosition return; } - // Abort if the first visible view was deleted during mount (not recycled) - // This prevents MVCP from applying a delta after scrollToOffset(0) during reset/clear - if (_firstVisibleView.superview != _contentView) { - return; - } - std::optional autoscrollThreshold = props.maintainVisibleContentPosition.value().autoscrollToTopThreshold; BOOL horizontal = _scrollView.contentSize.width > self.frame.size.width; // TODO: detect and handle/ignore re-ordering