You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit e43dac7
Browse filesBrowse the repository at this point in the historyBrowse files
Fix measuring views inside a scrolled RTL ScrollView on iOS
In RTL, RCTScrollViewComponentView mirrors both the UIScrollView and its
content view, and ScrollViewShadowNode moves the content container to x = 0.
ScrollViewState::contentOffset holds the raw UIScrollView offset, which is
measured from the opposite edge of the content in that layout, but
getContentOriginOffset subtracted it as if it were an LTR offset. measure,
measureInWindow, getBoundingClientRect and hit testing of views inside a
horizontal RTL ScrollView were off by
(contentWidth - viewportWidth) - 2 * contentOffset.x.
getContentOriginOffset now converts the offset the same way the scroll
events already do (contentWidth - viewportWidth - contentOffset.x) when the
scroll view is RTL on iOS. CullingContext flipped the culling frame to work
around the raw offset, so that flip is removed. In Fantom, scrollTo now
stores the raw offset like iOS does, and the image renderer applies the
same conversion, so events, measurement and screenshots agree.
0 commit comments