Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Scroll position not being restored on rapid scrolling up #355

Open
2 tasks done
RIPT1DE opened this issue Jun 21, 2020 · 4 comments
Open
2 tasks done

Scroll position not being restored on rapid scrolling up #355

RIPT1DE opened this issue Jun 21, 2020 · 4 comments

Comments

@RIPT1DE
Copy link

RIPT1DE commented Jun 21, 2020

Expected Behavior

It should restore the scroll position when the api call returns after scrolling all the way to the top.

Actual Behavior

When the api call returns, if the user has already scrolled all the way to the top by then, the scroll position isnt restored, instead, it jumps up to the top of the list again. (see demo). The scroll down behaviour is fine

Possible Solution

Steps To Reproduce / Demo (if applicable)

Demo

I have modified the modal section of the ngx-infinite-scroll demo to reproduce this issue. Timeouts have been added to the scroll up and scroll down handlers to simulate api calls, before appending new items to list. To reproduce the issue, simply open the modal and scroll rapidly to the top.

Context

I am using this as an infinite scroller for chat history. The history view is scrolled to the bottom by default, but as user scrolls up, older messages are fetched from the backend, and appended to the history. For now, it works fine, until the user scrolls very rapidly, and hits the top before api call returns.

Your Environment

  • Version used: 8.0.2
  • Browser Name and version: Electron js v 6.0.0
@todorpavlovic
Copy link

I have the same problem...

@svidoso
Copy link

svidoso commented Jul 14, 2020

Same here

@madmacc
Copy link

madmacc commented Sep 3, 2020

Exact same problem v8.0.2 and v9.0.0. Any fix in the works?

@silkcom
Copy link

silkcom commented May 20, 2021

Same issue. Is there a way to turn off the check to see if the scroll position is 0? I only load more results when they reach the very top, which means that it's always a jarring experience.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants