React Native Environment Info:
System:
OS: macOS High Sierra 10.13.3
CPU: x64 Intel(R) Core(TM) i7-7700HQ CPU @ 2.80GHz
Memory: 43.51 MB / 16.00 GB
Shell: 4.4.12 - /usr/local/bin/bash
Binaries:
Node: 9.3.0 - /usr/local/bin/node
Yarn: 1.3.2 - /usr/local/bin/yarn
npm: 5.6.0 - /usr/local/bin/npm
Watchman: 4.7.0 - /usr/local/bin/watchman
SDKs:
iOS SDK:
Platforms: iOS 11.2, macOS 10.13, tvOS 11.2, watchOS 4.2
Android SDK:
Build Tools: 23.0.1, 23.0.3, 25.0.0, 25.0.2, 25.0.3, 26.0.0, 26.0.1, 26.0.2, 27.0.3
API Levels: 19, 21, 22, 23, 24, 25, 26, 27
IDEs:
Android Studio: 2.3 AI-162.4069837
Xcode: 9.2/9C40b - /usr/bin/xcodebuild
npmPackages:
react: 16.3.1 => 16.3.1
react-native: 0.56.0-rc.4 => 0.56.0-rc.4
npmGlobalPackages:
react-native-cli: 2.0.1
Horizontal ScrollViews reset their scroll position when their content size changes on Android in RTL.
componentWillMount() {
I18nManager.forceRTL(true);
}
Environment
Description
Horizontal ScrollViews reset their scroll position when their content size changes on Android in RTL.
That description is a mouthful so here is a gif showing the problem:
Reproducible Demo
Here is a snack from expo made by @megantracy93 https://snack.expo.io/@meganltracy/scrollview-scrolltoend-rtl-issue
Steps to Reproduce:
Observed
Expected
Additional Info
From some debugging, we think ReactHorizontalScrollContainerView is likely the class which is responsible for positioning the horizontal ScrollView onLayout. That method gets called whenever the size of the contents change and resets the scroll position of the view. Instead, it should be setting it back to where it was before.