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
I noticed a few issues with how back navigation is handled with respect to scrolling.
When I scroll down on a page, open a link, and using the browser's back button go back to the previous page, the scroll position is reset to the top of the page. Normal browser behavior is to remember the scroll position when navigation back.
When I click the back button, there is a short flash where it seems that the page is scrolled to the top and then the content is changed. Ideally, the content change and scrolling would happen simultaneously.
On each navigation, store the scroll position in session storage.
This probably is not necessary for fragment changes, because to my knowledge the browser can handle those even in single page application, since they usually happen on the same (logical) page.
When navigating back, the scroll position is retrieved from the session storage and scrolled to.
I noticed a few issues with how back navigation is handled with respect to scrolling.
For handling the scroll restauration on back navigation, react-router seems to follow this strategy:
history.scrollRestoration
tomanual
to prevent clashes with the browser's behavior.The text was updated successfully, but these errors were encountered: