From e9ea976cb1255fb42c2ad9c7084a174ea60bbc46 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20=C5=BBuralski?= <20515925+piotr-zuralski@users.noreply.github.com> Date: Sat, 11 May 2019 18:44:51 +0200 Subject: [PATCH] fix for overriding user browser history - replaceState to pushState - user can go back and forward (#9433) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Piotr Żuralski --- source/components/index.html | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/source/components/index.html b/source/components/index.html index a81f9750a51..6278af8d5f4 100644 --- a/source/components/index.html +++ b/source/components/index.html @@ -147,7 +147,7 @@ allComponents.pop(); // remove placeholder element at the end var data = { components: [], image: function () { - if(this.logo === '') { + if (this.logo === '') { return ''; } else { return ''; @@ -216,8 +216,8 @@ allComponents.pop(); // remove placeholder element at the end * update the browser location hash. This enables users to use the browser-history */ function updateHash(newHash) { - if ('replaceState' in history) { - history.replaceState('', '', newHash); + if ('pushState' in history) { + history.pushState('', '', newHash); } else { location.hash = newHash; }