window scrolling in Safari #43
Replies: 3 comments 8 replies
-
How initialOffset/initialIndex work now in safari in your case? |
Beta Was this translation helpful? Give feedback.
-
In Safari for desktop it works just perfectly. I get |
Beta Was this translation helpful? Give feedback.
-
Sorry, never seen the notification from GitHub. I'll try beta asap. You mean now it is not necessary to calculate bounding rect top for element I want to scroll to? Also, I probably wouldn't be really happy with removal of scrollToIndex method. For example. I have a component that has cached data and needs to be scrolled to correct position twice because height of DOM changes after data loading and ViewportList gets me to the top when this happens. In short, I need to call ScrollToIndex twice when there's no fresh content and when it is. But thank you anyway for your hard work at making the best virtual list library for React so far ) |
Beta Was this translation helpful? Give feedback.
-
I just wonder...
Hi, we talked here about Safari already and even fixed some stuff. It was a pleasure. Thank you. Let's talk again
I have an app with a large list of items. And I use
initialOffset
withinitialIndex
to get pixel perfect restoring of position in the list when user goes back. This method does not work in mobile Safari for some reasons. The only way to achieve it is to use div instead of document.documentElement but of course it has some caveats and Safari obviously behaves differently with such componentAm I understand correctly that to get proper scrolling restoration I must sacrifice:
Or someone figured out how to use div and preserve these features? Or restore position correctly using
window
as a scrolling container?Beta Was this translation helpful? Give feedback.
All reactions