From b93e718baa6318ebc9748044de05901a7dbd4011 Mon Sep 17 00:00:00 2001 From: David Cramer <david@thingbag.net> Date: Sat, 29 Oct 2011 15:41:58 +0000 Subject: [PATCH] Fixed bug where content scrolls up when search or contents tab are clicked --- xsl/webhelp/template/common/main.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); -- 2.40.0