Skip to content

List jumping when new items are loaded #432

Open
@jakub-wisniowski-widelab

Description

Hi, I'm using ng v14, ngx-infinite-scroll v13.1.0

When I scroll quickly to the bottom of the list, new elements are loaded and the list jumps down - sometimes by only 1-2 items (that's acceptable) but sometimes by 10 items. I would expect this behaviour:

  • user scrolls to the bottom
  • new items are loaded
  • scrollbar's thumb goes up (to reflect new items below) but items in the viewport stay the same

I tried the solution from this thread it's a bit better but still not perfect - setting interval to 2000ms mostly fixes the problem with jumping, but scrolling gets laggy.

Here is the stackblitz: https://stackblitz.com/edit/ngx-infinite-scroll-kiwalq

Is there any way to fix it?

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions