]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 364952 - "Clicking "Hide/Show Obsolete" link should not scroll show_bug page...
authorreed%reedloden.com <>
Wed, 27 Dec 2006 09:14:39 +0000 (09:14 +0000)
committerreed%reedloden.com <>
Wed, 27 Dec 2006 09:14:39 +0000 (09:14 +0000)
template/en/default/attachment/list.html.tmpl

index 57840db03b081f30279917ed40cbf57333fd7d62..5da894e0724bbaf42b42bd71be8cf311369a256f 100644 (file)
@@ -25,6 +25,7 @@
   function toggle_display(link) {
     var table = document.getElementById("attachment_table");
     var rows = table.getElementsByTagName("tr");
+    var originalHeight = table.offsetHeight; // Store current height for scrolling
 
     var toggle;
     if (link.innerHTML == "Show Obsolete") {
       if (rows[i].className.match('bz_tr_obsolete'))
         rows[i].style.display = toggle;
     }
-    return true;
+
+    var newHeight = table.offsetHeight;
+    window.scrollBy(0, newHeight - originalHeight);
+
+    return false;
   }
   //-->
 </script>