Skip to content

Opening or navigating to sidebar links should focus/scroll to the sidebar item #4296

Open
@shinebayar-g

Description

@shinebayar-g

Describe the bug

Opening or navigating to sidebar links should focus the sidebar item. (Similar to VSCode's "explorer.autoReveal": true setting) Currently if sidebar is really long or out of the view port, it's not possible to know where I'm at.

Reproduction

Example 1

Example 2

Expected behavior

Opening sidebar link should focus on the sidebar item. If sidebar is long, it should scroll down the sidebar scroll position.
Example: Opening this page would automatically scroll down the sidebar position https://learn.microsoft.com/en-us/dotnet/fsharp/tutorials/type-providers/troubleshooting-type-providers

System Info

npmPackages:
    vitepress: 1.4.1 => 1.4.1

Additional context

Not sure if it should be considered as a feature request.

Validations

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions