From b873148e5d147c961d2e70144b69d104570d6846 Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Tue, 1 Apr 2014 23:14:47 +0200 Subject: [PATCH] Fix for Firefox poorly scrolling to anchors --- wcfsetup/install/files/js/WCF.js | 8 ++++++++ 1 file changed, 8 insertions(+) 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; -- 2.20.1