From 01c19ab6344bd51121889bc43528ad2661cecbda Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20B=C3=B6hmer?= Date: Mon, 11 May 2020 23:34:48 +0200 Subject: [PATCH] Dont create a new history entry if tab is changed. This made back navigation really difficult. Now URL is replaced via replaceState. --- assets/ts_src/event_listeners.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/assets/ts_src/event_listeners.ts b/assets/ts_src/event_listeners.ts index d4deeed8..226d907d 100644 --- a/assets/ts_src/event_listeners.ts +++ b/assets/ts_src/event_listeners.ts @@ -346,8 +346,8 @@ $(document).on("ajaxUI:reload ajaxUI:start", function () { $('body').on('click', 'a[data-toggle=\'tab\']', function (e) { e.preventDefault() var tab_name = this.getAttribute('href') - if (history.pushState) { - history.pushState(null, null, tab_name) + if (history.replaceState) { + history.replaceState(null, null, tab_name) } else { location.hash = tab_name