From: reed%reedloden.com <> Date: Wed, 27 Dec 2006 09:14:39 +0000 (+0000) Subject: Bug 364952 - "Clicking "Hide/Show Obsolete" link should not scroll show_bug page... X-Git-Tag: bugzilla-2.23.4~123 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e3aed7515a6e413a9c9152493a2c98af7b94c671;p=thirdparty%2Fbugzilla.git Bug 364952 - "Clicking "Hide/Show Obsolete" link should not scroll show_bug page" [p=reed/Hannibal r=LpSolit a=justdave] --- diff --git a/template/en/default/attachment/list.html.tmpl b/template/en/default/attachment/list.html.tmpl index 57840db03b..5da894e072 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; } //-->