Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(647)

Unified Diff: components/crash/core/browser/resources/crashes.js

Issue 2580543002: Fixed a crash scrolls bug. (Closed)
Patch Set: Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/crash/core/browser/resources/crashes.js
diff --git a/components/crash/core/browser/resources/crashes.js b/components/crash/core/browser/resources/crashes.js
index 89a0bea508d545b866bf6cc69117b632d1543fa3..9b2bbfa14f2125b970ceb339fed5cc47a0fbfcb6 100644
--- a/components/crash/core/browser/resources/crashes.js
+++ b/components/crash/core/browser/resources/crashes.js
@@ -33,6 +33,9 @@ function updateCrashList(
$('disabledMode').hidden = enabled;
$('crashUploadStatus').hidden = !enabled || !dynamicBackend;
+ // Make the height fixed while clearing the
+ // element in order to maintain scroll position.
+ crashSection.style.height = getComputedStyle(crashSection).height;
// Clear any previous list.
crashSection.textContent = '';
@@ -141,6 +144,8 @@ function updateCrashList(
crashSection.appendChild(crashBlock);
}
+ // Reset the height, in order to accommodate for the new content.
+ crashSection.style.height = "";
$('noCrashes').hidden = crashes.length != 0;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698