hashchange: Update spectator hash when hash changed internally.

replaceState / pushState update browser hash without calling
hashchange. So, we need to update state manually in those cases.
This commit is contained in:
Aman Agrawal 2021-11-17 12:24:41 +00:00 committed by Tim Abbott
parent dabc8fa99f
commit 1e5866b785
1 changed files with 1 additions and 0 deletions

View File

@ -54,6 +54,7 @@ function set_hash(hash) {
if (history.pushState) {
const url = get_full_url(hash);
history.pushState(null, null, url);
browser_history.update_web_public_hash(hash);
} else {
blueslip.warn("browser does not support pushState");
window.location.hash = hash;