petyosi / react-virtuoso

The most powerful virtual list component for React
https://virtuoso.dev
MIT License
5.16k stars 299 forks source link

[BUG]no render if 'Scroll to Index" while scroll #989

Closed jlak0 closed 11 months ago

jlak0 commented 11 months ago

Describe the bug no itmes rendered if use scroll to index while scrolling

Reproduction https://virtuoso.dev/scroll-to-index/ https://codesandbox.io/s/judrto?file=/App.js&utm_medium=sandpack https://judrto.csb.app/

To Reproduce Steps to reproduce the behavior:

  1. With a smartphone
  2. Scroll the page
  3. while the page is still scrolling
  4. tap on scroll to
  5. you can see no items is rendered

Desktop (please complete the following information): iOS17 Safari&Chrome

petyosi commented 11 months ago

This seems to be some "fun" bug in iOS safari. The scroller goes to the right location, the elements are there, but for some reason, the browser does not paint them.

In the past, I've managed to fix similar cases by applying translate3d to the element that does not render. I do believe that this results in additional performance overhead, though. Feel free to find a workaround that works for your case.