Skip to content

Scroll position isn't remembered when going "back" in history #4

@MaximilianKresse

Description

@MaximilianKresse

Describe the bug

Currently the scroll position is only be remembered when navigating "normally" through the page. There is an explicit return to prevent saving the state when using the history back button:
https://github.com/antfu/vue-router-better-scroller/blob/main/src/index.ts#L23

Why is that so?

The problem is that when using the history forward button afterwards the scroll position cannot be restored.

Validations

  • Follow our Code of Conduct
  • Read the Contributing Guide.
  • Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
  • Check that this is a concrete bug. For Q&A, please open a GitHub Discussion instead.

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