Skip to content

feat: restore scroll position on back/forward navigation #61

@adnaan

Description

@adnaan

After SPA navigation, pressing Back returns to the previous page but at scroll position 0. The user's previous scroll position should be restored.

Expected behavior:

  • Set `history.scrollRestoration = 'manual'`
  • Store scroll positions in `history.state` when navigating
  • Restore scroll position on popstate (back/forward)

Reference: Turbo Drive scroll restoration, Phoenix LiveView scroll PR.

Discovered during cross-handler SPA navigation research (PR #58).

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions