Keep the hash in the URL while the pad is loading

This commit is contained in:
yflory 2020-01-27 18:09:02 +01:00
parent deddc80270
commit 83c35543b9

View file

@ -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)) {