From: David Cramer Date: Fri, 13 Jan 2012 17:47:29 +0000 (+0000) Subject: Webhelp: Avoid unnecessary scroll ups when anchor is clicked on X-Git-Tag: release/1.79.1~6^2~582 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=05e6b7f26ef31a11ac3d7bf8a9eb37998978d32a;p=docbook-dsssl Webhelp: Avoid unnecessary scroll ups when anchor is clicked on --- diff --git a/xsl/webhelp/template/common/main.js b/xsl/webhelp/template/common/main.js index ee0f8f2f6..fd4c4e4ab 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 (!(this.hash == "#searchDiv" || this.hash == "#treeDiv") && $target.length) { + if (!(this.hash == "#searchDiv" || this.hash == "#treeDiv" || this.hash == "") && $target.length) { var targetOffset = $target.offset().top - 110; $('html,body') .animate({scrollTop: targetOffset}, 200);