]> granicus.if.org Git - docbook-dsssl/commitdiff
Fixed bug where content scrolls up when search or contents tab are clicked
authorDavid Cramer <david@thingbag.net>
Sat, 29 Oct 2011 15:41:58 +0000 (15:41 +0000)
committerDavid Cramer <david@thingbag.net>
Sat, 29 Oct 2011 15:41:58 +0000 (15:41 +0000)
xsl/webhelp/template/common/main.js

index 35415cd60841241405be1a239235662161e2cc9c..ee0f8f2f615b2a50b875e8bc55f8d8ad6a789271 100644 (file)
@@ -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);