-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Description
What happened?
When using QInfiniteScroll in reverse mode then vertical scroll position after call done argument computed incorrect. Only if the displayed content has not changed. The scrolling behavior in the browsers can be controlled using overflow-anchor css rule, but the current implementation QInfiniteScroll assumes that the scroll is always moved by heightDifference position as a result of updating the content in the scroll container - this is what happens when the content changes completely (for example, if not used :key="item.id"), but when new content is added to the old one, the browser itself adjusts the scroll position and in this case QInfiniteScroll set incorrect scroll position. An animation of the problem demonstration is attached, as well as a link to the codepen
zapis-ekrana-2025-02-21-v-211625_yW5xubsm.mp4
What did you expect to happen?
The scroll behaves as shown in the documentation and
Reproduction URL
https://codepen.io/martynoff/pen/XJWdVOm?editors=1010
How to reproduce?
The animation above shows how to scroll up and expect the content to shift. There is no need to scroll to the very top position
Flavour
Quasar CLI with Webpack (@quasar/cli | @quasar/app-webpack)
Areas
Components (quasar)
Platforms/Browsers
Firefox, Chrome, Safari, Android