mirror of https://github.com/zulip/zulip.git
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:
parent
dabc8fa99f
commit
1e5866b785
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue