Skip to content

The functionality of the resetScroll property of the Link component is reversed. When it is set to false, it resets to 0,0. #6135

@abeixiaolu

Description

@abeixiaolu

Which project does this relate to?

Router

Describe the bug

The functionality of the resetScroll property of the Link component is reversed. When it is set to false, it resets to 0,0.

Your Example Website or App

https://github.com/abeixiaolu/tanstack-admin

Steps to Reproduce the Bug or Issue

  1. Check if resetScroll in the code is false, and first scroll in the home for a while.
  2. Click on "about", then click on "home" again, and you'll find that the home has been reset.
  3. Set it to true, then repeat the above process, and the home scroll will not be reset.

Expected behavior

When set to true, it returns to the position (0,0). When set to false, it retains the scroll position.

Screenshots or Videos

Screen.Recording.2025-12-18.at.17.23.53.mov

Platform

Image

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions