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
Due to the way browsers work, if the user manually edits the URL to
change the hash to another snippet ID and presses enter, the first time
it will cause a hash change event (typically scrolls page to the
matching anchor, without reloading page). Second time the user presses
enter, since the hash has not changed, it will instead reload the page,
and in our case reload the snippet.
Therefore, before this PR, if the user manually edits the URL in
browser to another snippet ID, first time it did not actually load it.
After this PR, it will always try to load the snippet whose ID is in
the URL box.
I think this leads to a better user experience as it eliminates a
possible confusing behavior. It's also more efficient than reloading
entire page, since that is not necessary.
0 commit comments