yoga
yoga copied to clipboard
[BUG] Scroll Position Remains Fixed, Even When The Content Rerenders
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:
- Go to https://gympass.github.io/yoga/components/getting-started
- Scroll down to the very bottom
- Select any of the links from the side navigation bar
- 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
@tabishnaqvi1311 You mean on clicking a link it should go to the top of the page right?