Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
ListView scrolling in Apple TV (TV OS) #12793
In an Apple TV app I use a horizontal ListView. When the last visible item is focused, sometimes the ListView starts frantically scrolling, reaches the end of the ListView and then even bounces back and scrolls to the first item again.
Can be reproduced with both horizontal and vertical ListView. It seems that the bug occurs more if the items inside the ListView are bigger.
So far I didn't find any solution.
@milhauscz this can be fixed by setting the ListView's removeClippedSubviews property to false. Otherwise, tvOS will believe that the bottommost unclipped view is the last one, and try to scroll all the way to the bottom of the view, leading to the unpleasant behavior you are seeing. For example code see the commits in https://github.com/dlowder-salesforce/react-native/tree/tvos-listview
https://github.com/dlowder-salesforce/react-native/tree/tvos-listview-fix has a modification to actually fix this for all ListViews, and some changes to the UIExplorer ListViewGridLayoutExample. When you run the example on tvOS with these changes, the scrolling problem is fixed, and also you can actually see new cells render at the bottom of the screen as you navigate down using the TV remote.
referenced this issue
Mar 14, 2017
@dlowder-salesforce, @milhauscz I would love to fix this issue properly... but... Could you please confirm one more time: Does setting
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:
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.