From 83c35543b955f9abc039c524b3524f1c14e0fb54 Mon Sep 17 00:00:00 2001 From: yflory Date: Mon, 27 Jan 2020 18:09:02 +0100 Subject: [PATCH] Keep the hash in the URL while the pad is loading --- www/common/sframe-common-outer.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/www/common/sframe-common-outer.js b/www/common/sframe-common-outer.js index f9a2baa23..c92bc5121 100644 --- a/www/common/sframe-common-outer.js +++ b/www/common/sframe-common-outer.js @@ -142,6 +142,12 @@ define([ driveEvents: cfg.driveEvents, currentPad: currentPad }); + + if (window.history && window.history.replaceState && currentPad.hash) { + var nHash = currentPad.hash; + if (!/^#/.test(nHash)) { nHash = '#' + nHash; } + window.history.replaceState({}, window.document.title, nHash); + } })); }).nThen(function (waitFor) { if (!Utils.Hash.isValidHref(window.location.href)) {