From 535be52b7459cc64d1d9e9f2f7b1c1a9ed4be515 Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Tue, 14 May 2013 21:12:07 +0200 Subject: [PATCH] Fixed tab menu history manipulation --- wcfsetup/install/files/js/WCF.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/wcfsetup/install/files/js/WCF.js b/wcfsetup/install/files/js/WCF.js index b666b3314d..6c62c554fc 100755 --- a/wcfsetup/install/files/js/WCF.js +++ b/wcfsetup/install/files/js/WCF.js @@ -3317,7 +3317,12 @@ WCF.TabMenu = { // set panel id as location hash if (WCF.TabMenu._didInit) { - location.hash = '#' + $panel.attr('id'); + if (window.history) { + window.history.pushState(null, document.title, window.location.toString().replace(/#.+$/, '') + '#' + $panel.attr('id')); + } + else { + location.hash = '#' + $panel.attr('id'); + } } //$container.trigger('tabsbeforeactivate', event, eventData); -- 2.20.1