Chrome: Flatlist with pagingEnabled breaks when number of items exceeds windowSize
The problem
When the number of items in a FlatList exceeds the windowSize, as you scroll, it will render new items. For some reason on Chrome, this breaks lists with pagingEnabled and you get truly weird jerky results. It works as expected on Safari.
How to reproduce
Simplified test case: https://codesandbox.io/embed/stupefied-violet-s0r7s?fontsize=14&hidenavigation=1&theme=dark
Steps to reproduce: Scroll the list horizontally
Expected behavior
List snaps properly to each item start. Instead, it keeps jerking around.
https://user-images.githubusercontent.com/10298/118751875-c97db600-b7fd-11eb-8b12-6df336cc6beb.mov
Environment (include versions). Did this work in previous versions?
- React Native for Web (version): 0.16.3
- React (version): 17.0.2
- Browser: Chrome Version 91.0.4472.57
@necolas this bug still exists on 0.18.2
Happes with 0.19 and React 18 as well: https://codesandbox.io/s/black-wildflower-kj4r77