From: Marcel Werk Date: Fri, 1 Jul 2016 14:16:05 +0000 (+0200) Subject: Merge pull request #2006 from Fabii547/patch-13 X-Git-Tag: 3.0.0_Beta_1~1286 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=39926da0255567c9047bc9ebf216e89fa908b138;p=GitHub%2FWoltLab%2FWCF.git Merge pull request #2006 from Fabii547/patch-13 Fix tab menu --- 39926da0255567c9047bc9ebf216e89fa908b138 diff --cc wcfsetup/install/files/js/WoltLab/WCF/Ui/TabMenu/Simple.js index c5902a4640,b07e64ca03..7da8f7745f --- a/wcfsetup/install/files/js/WoltLab/WCF/Ui/TabMenu/Simple.js +++ b/wcfsetup/install/files/js/WoltLab/WCF/Ui/TabMenu/Simple.js @@@ -237,11 -229,27 +238,10 @@@ define(['Dictionary', 'EventHandler', ' if (this._isLegacy) { tab.classList.add('ui-state-active'); newContent.classList.add('ui-state-active'); - newContent.classList.remove('hidden'); } - var menu = tab.parentNode.parentNode; - - // set pointer position - var span = DomTraverse.childByTag(menu, 'SPAN'); - - // make sure that the tab is (temporarily) visible so that offsetLeft has the proper value - var toggleHidden = false; - if (menu.classList.contains('menu') && menu.parentNode.classList.contains('hidden')) { - toggleHidden = true; - menu.parentNode.classList.remove('hidden'); - } - - if (span !== null) { - span.style.setProperty('transform', 'translateX(' + tab.offsetLeft + 'px)', ''); - span.style.setProperty('width', tab.clientWidth + 'px', ''); - } - - if (toggleHidden) { - menu.parentNode.classList.add('hidden'); + if (this._store) { + this._store.value = name; } if (!disableEvent) {