Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -692,9 +692,11 @@ - (void)prepareForRecycle
_state.reset();

const auto &props = static_cast<const ScrollViewProps &>(*_props);
_scrollView.contentOffset = RCTCGPointFromPoint(props.contentOffset);
// Reset zoom scale to default
// Reset zoom scale to default. This must happen before resetting contentOffset:
// in RTL the mirroring transform makes UIKit report zoomScale == -1, and changing
// it to 1 makes UIKit move contentOffset.
_scrollView.zoomScale = 1.0;
_scrollView.contentOffset = RCTCGPointFromPoint(props.contentOffset);
// Invalidate cached content size so that updateState: recalculates the
// container frame after zoomScale reset (which may have mutated it in RTL).
_contentSize = CGSizeZero;
Expand Down
Loading