Skip to content

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

@jashan777

Description

@jashan777

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions