From e3aed7515a6e413a9c9152493a2c98af7b94c671 Mon Sep 17 00:00:00 2001 From: "reed%reedloden.com" <> Date: Wed, 27 Dec 2006 09:14:39 +0000 Subject: Bug 364952 - "Clicking "Hide/Show Obsolete" link should not scroll show_bug page" [p=reed/Hannibal r=LpSolit a=justdave] --- template/en/default/attachment/list.html.tmpl | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/template/en/default/attachment/list.html.tmpl b/template/en/default/attachment/list.html.tmpl index 57840db03..5da894e07 100644 --- a/template/en/default/attachment/list.html.tmpl +++ b/template/en/default/attachment/list.html.tmpl @@ -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") { @@ -40,7 +41,11 @@ 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; } //--> -- cgit v1.2.3-24-g4f1b