From a335ca08958418b11a0198ecb92975d65cb341b6 Mon Sep 17 00:00:00 2001 From: Jens Langhammer Date: Tue, 4 May 2021 18:13:20 +0200 Subject: [PATCH] web/admin: use history.replaceState in Tabs to prevent double history entries Signed-off-by: Jens Langhammer --- web/src/elements/Tabs.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/src/elements/Tabs.ts b/web/src/elements/Tabs.ts index a7895b455..bacec9690 100644 --- a/web/src/elements/Tabs.ts +++ b/web/src/elements/Tabs.ts @@ -54,7 +54,7 @@ export class Tabs extends LitElement { this.currentPage = slot; const currentUrl = window.location.hash.slice(1, Infinity).split(ROUTE_SEPARATOR)[0]; const newUrl = `#${currentUrl};${slot}`; - window.location.hash = newUrl; + history.replaceState(undefined, "", newUrl); } renderTab(page: Element): TemplateResult {