From: David Cramer Date: Sat, 29 Oct 2011 15:41:58 +0000 (+0000) Subject: Fixed bug where content scrolls up when search or contents tab are clicked X-Git-Tag: release/1.79.1~6^2~631 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b93e718baa6318ebc9748044de05901a7dbd4011;p=docbook-dsssl Fixed bug where content scrolls up when search or contents tab are clicked --- diff --git a/xsl/webhelp/template/common/main.js b/xsl/webhelp/template/common/main.js index 35415cd60..ee0f8f2f6 100644 --- a/xsl/webhelp/template/common/main.js +++ b/xsl/webhelp/template/common/main.js @@ -20,7 +20,7 @@ $(document).ready(function() { var $target = $(this.hash); $target = $target.length && $target || $('[name=' + this.hash.slice(1) +']'); - if ($target.length) { + if (!(this.hash == "#searchDiv" || this.hash == "#treeDiv") && $target.length) { var targetOffset = $target.offset().top - 110; $('html,body') .animate({scrollTop: targetOffset}, 200);