Jumping back during scroll when rows have different height
It shows related, but probably separate defect (might make sense to track it separately) - if minIndex is specified on the datasource then on initial load or reload the viewport is positioned not to the startIndex element, but rather to some element closer to the minIndex, all after doing multiple requests for more data from the datasource. So, instead of showing item 1 on load it would show something like item 94 by default.
This might be a special case because adjustScrollTopAfterMinIndexSet is not called until after the loading is done, yet adjustPadding relies on current value of minIndexUser, so scroll and padding are out sync while reload is being processed.
On other hand, if we consider adjustBuffer and adjustScrollTop* as something that need to work in tandem to ensure that viewport.scrollTo is maintained correctly, then it can be treated as parts of the same defect.
It seems that logic in adjustScrollTopAfterPrepend is a bit off for some cases when topPadding.height() == 0 already, i.e. for the case when we already reached bof and need to adjust viewport.scrollTo() after elements for newly added items are resized. In case when we are at bof we are already have all the items added to DOM, resized and properly scrolled to, so there is no need to change viewport.scrollTo().
Please sign in to leave a comment.
Comments
0 comments