You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Question 1:
When I refresh the browser while reading a document, the scrollbar is at the top before the page is fully loaded, which means scrollY is 0. It then returns to the last reading position. This process is not smooth visually, as there is a relatively long interval in the middle.
I also found that the VitePress documentation site has the same issue.
Question 2:
How to make the scrollbar not return to the last position after refreshing the browser, but always stay at the top?
Because I am developing a VitePress theme, as shown in the screenshot of question one, it shows that after the page is loaded, a line-by-line display animation effect will be played. If the scrollbar returns to the last position, then when the animation has not yet played into the visible area, there will be a period of blank content, so I hope to find a method that can make the page always return to the top each time the page is refreshed.
Describe the bug
Question 1:
When I refresh the browser while reading a document, the scrollbar is at the top before the page is fully loaded, which means scrollY is 0. It then returns to the last reading position. This process is not smooth visually, as there is a relatively long interval in the middle.
I also found that the VitePress documentation site has the same issue.
Question 2:
How to make the scrollbar not return to the last position after refreshing the browser, but always stay at the top?
Because I am developing a VitePress theme, as shown in the screenshot of question one, it shows that after the page is loaded, a line-by-line display animation effect will be played. If the scrollbar returns to the last position, then when the animation has not yet played into the visible area, there will be a period of blank content, so I hope to find a method that can make the page always return to the top each time the page is refreshed.
Reproduction
repo: https://github.com/hacxy/vitepress-theme-mild
Expected behavior
Provide option to disable the scrollbar returning to the position before refreshing the page after refreshing.
System Info
Additional context
No response
Validations
The text was updated successfully, but these errors were encountered: