From: Alexander Ebert Date: Tue, 1 Apr 2014 21:14:47 +0000 (+0200) Subject: Fix for Firefox poorly scrolling to anchors X-Git-Tag: 2.0.5~14^2 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=b873148e5d147c961d2e70144b69d104570d6846;p=GitHub%2FWoltLab%2FWCF.git Fix for Firefox poorly scrolling to anchors --- diff --git a/wcfsetup/install/files/js/WCF.js b/wcfsetup/install/files/js/WCF.js index fb1a4a7828..88ab6dce99 100755 --- a/wcfsetup/install/files/js/WCF.js +++ b/wcfsetup/install/files/js/WCF.js @@ -3822,6 +3822,14 @@ WCF.TabMenu = { if (!this._selectErroneousTab()) { this.selectTabs(); } + + if ($.browser.mozilla && location.hash) { + var $target = $(location.hash); + if ($target.length && $target.hasClass('tabMenuContent')) { + var $offset = $target.offset(); + window.scrollTo($offset.left, $offset.top); + } + } } this._didInit = true;