From 1e5866b785af7959bdb4ad343e32739ff826b907 Mon Sep 17 00:00:00 2001 From: Aman Agrawal Date: Wed, 17 Nov 2021 12:24:41 +0000 Subject: [PATCH] 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. --- static/js/hashchange.js | 1 + 1 file changed, 1 insertion(+) diff --git a/static/js/hashchange.js b/static/js/hashchange.js index b051285edf..67dc74e7c0 100644 --- a/static/js/hashchange.js +++ b/static/js/hashchange.js @@ -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;