Skip to content

Issue with scrolling behavior in VueRouter #533

@JanssenBrm

Description

@JanssenBrm

Hi all,

While testing the STAC browser, we observed that the VueRouterretains the current scroll position when navigating to a new page. This becomes inconvenient when dealing with a large number of collections; for example, selecting a collection lower down the list leaves you viewing the bottom of the subsequent page rather than starting at the top.

The fix for this appears straightforward:

scrollBehavior() {
  return { x: 0, y: 0 };
}

Before proceeding, I wanted to gather your thoughts on this. I’m happy to create a PR if needed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    help wantedExtra attention is needed

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions