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
fix(navigation): don't scroll to hash on replace navigation within page
When we do a client side page navigation via wouter, if there is a hash
anchor in the url, we scroll to that anchor to match the default browser
behavior.
This means that if we want to update the URL to match the user's current
scroll location in the document, we end up triggering a second scroll.
To avoid this, do not scroll to the anchor if the following conditions
are met:
- The navigation is happening on the same page:
(i.e. from some/url#foo to some/url#bar)
- The navigation was triggered by a history.replaceState() action
0 commit comments