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

Inconsistent scroll restoration behaviour on infinite loading components across browsers #109

Open
jashan777 opened this issue Nov 11, 2024 · 0 comments

Comments

@jashan777
Copy link

summary

Encountered inconsistent scroll restoration behavior on infinite loading components wrapped with <ScrollContainer>, specifically across different browsers.

Steps to Reproduce

  1. Implement an infinite loading component that asynchronously loads data as the user scrolls.
  2. Wrap the component with <ScrollContainer> to manage scroll positions.
  3. Navigate to the component and scroll down to load additional content.
  4. Navigate away from the component.
  5. Navigate back to the component to trigger scroll restoration.

Observed Behavior

  • Google Chrome:
    The scroll position is forcibly restored to where the user left off.
    If additional data needs to be loaded to reach that scroll position, the component loads data asynchronously and the package restores the scroll repeatedly in a sync until the original leftoff position is reached.

  • Safari and Firefox:
    The scroll position is only restored once.
    If more data is required to reach the previous scroll position, the component does load the next set of data but scroll restoration does not happen again or in a sync.

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

1 participant