React-native: React-Native scrollToEnd on iOS behaves differently than scrolling manually, putting items to bottom

Created on 17 Mar 2017  路  4Comments  路  Source: facebook/react-native

Description

Please consider this example on iOS: https://sketch.expo.io/SyeyMSx_il

Try to scroll manually, everything looks normal: No comments message stays on top.
If you click now on the button now, the No comments message sticks to the bottom.
If you scroll manually again, everything goes normal again.
Why using scrollToEnd should be different than scrolling manually? And how to fix this weird behaviour?

Reproduction

https://sketch.expo.io/SyeyMSx_il

Solution

No cool solution yet http://stackoverflow.com/questions/42833386/react-native-scrolltoend-on-ios-behaves-differently-than-scrolling-manually-put/42845864#42845864

Additional Information

  • React Native version: 0.42.0
  • Platform: iOS
  • Operating System: MacOS
  • Dev tools: Xcode
iOS Locked

Most helpful comment

Adding to ScrollView contentContainerStyle={{ flexGrow: 1 }} helped me.

All 4 comments

Adding to ScrollView contentContainerStyle={{ flexGrow: 1 }} helped me.

That workaround is working, indeed. Thanks.

Any ideas on why that would fix it?

Hi there! This issue is being closed because it has been inactive for a while. Maybe the issue has been fixed in a recent release, or perhaps it is not affecting a lot of people. Either way, we're automatically closing issues after a period of inactivity. Please do not take it personally!

If you think this issue should definitely remain open, please let us know. The following information is helpful when it comes to determining if the issue should be re-opened:

  • Does the issue still reproduce on the latest release candidate? Post a comment with the version you tested.
  • If so, is there any information missing from the bug report? Post a comment with all the information required by the issue template.
  • Is there a pull request that addresses this issue? Post a comment with the PR number so we can follow up.

If you would like to work on a patch to fix the issue, contributions are very welcome! Read through the contribution guide, and feel free to hop into #react-native if you need help planning your contribution.

Was this page helpful?
0 / 5 - 0 ratings