Skip to content

[BUG] Scroll Position Remains Fixed, Even When The Content Rerenders #650

@tabishnaqvi1311

Description

@tabishnaqvi1311

Describe the bug
When using the side menu to navigate through the documentation, there is a problem where, if you are at the bottom of a page and you select a different section from the menu, the page does not automatically scroll back up to the top. Instead, you remain at the bottom of the page, which can be inconvenient and make it harder to navigate efficiently through the documentation. This behavior can be confusing and frustrating for users who are trying to quickly browse through the content.

To Reproduce
Steps to reproduce the behavior:

  1. Go to https://gympass.github.io/yoga/components/getting-started
  2. Scroll down to the very bottom
  3. Select any of the links from the side navigation bar
  4. Notice how the content re-renders, but the scrollbar remains fixed

Expected behavior
Instead of the scroll position remaining static, it would be convenient if the user does not have to scroll back up every time they open a new link.

Screenshots
https://user-images.githubusercontent.com/115006878/231274800-efd84dde-8144-44dd-b8f6-77e41e2700ca.mp4

Desktop (please complete the following information):

  • OS: Windows 10
  • Browser: Google Chrome, Opera, Firefox

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions