react-native-web icon indicating copy to clipboard operation
react-native-web copied to clipboard

Chrome: Flatlist with pagingEnabled breaks when number of items exceeds windowSize

Open elan opened this issue 4 years ago • 2 comments

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

elan avatar May 19 '21 03:05 elan

@necolas this bug still exists on 0.18.2

xuchaoying avatar Jun 28 '22 07:06 xuchaoying

Happes with 0.19 and React 18 as well: https://codesandbox.io/s/black-wildflower-kj4r77

kidroca avatar Jul 17 '23 10:07 kidroca