iOS-iPAD ScrollView centerContent with maximumZoomScale and minimumZoomScale renders content with an offset on top on first render #16820
Labels
Ran Commands
One of our bots successfully processed a command.
Stale
There has been a lack of activity on this issue and it may be closed soon.
Is this a bug report?
yes
Have you read the Contributing Guidelines?
yes
Environment
OS: macOS Sierra 10.12.6
Node: 7.7.1
Yarn: Not Found
npm: 4.1.2
Watchman: 4.7.0
Xcode: Xcode 9.0.1 Build version 9A1004
Android Studio: Not Found
Packages: (wanted => installed)
react: 16.0.0 => 16.0.0
react-native: 0.50.3 => 0.50.3
Steps to Reproduce
On a iOS IPAD :
scrollEnabled centerContent maximumZoomScale={15} minimumZoomScale={0.01}
<View style={{ width: '100%', height: Dimensions.get('window').height * 2, backgroundColor: 'green' }} />
Expected Behavior
The scrollview renders the green view with no offset on top. So what we see is a screen entirely green.
Actual Behavior
The scrollview renders is content with a top offset that is half of the height of the screen. It's refreshed correctly as soon as you touch the screen. If we don't set the centerContent props, we don't get this bug. This occurs only on IPAD-IOS. On iPhone, we don't get this bug
Reproducible Demo
Start with basic App and render this code under iPAD.
Tested both on simulator and device : https://screencast.com/t/agiYJw1Ws
Red is the root view and green is the view rendered within the scrollview, that would as no scroll off set at all.
The text was updated successfully, but these errors were encountered: