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

Unified Diff: chrome/browser/resources/extensions/extension_list.js

Issue 68723003: Make chrome/ be documentElement/body agnostic with regards to scrollTop/Left (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@issue_305800
Patch Set: Created 7 years, 1 month 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 | « chrome/browser/resources/about_memory.js ('k') | chrome/browser/resources/help/help_base_page.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/extensions/extension_list.js
diff --git a/chrome/browser/resources/extensions/extension_list.js b/chrome/browser/resources/extensions/extension_list.js
index 7d6187ae2b76e2f41357402194d01065490b3563..9e3826a5665f4c0d9c62fc7738c5d64bab897762 100644
--- a/chrome/browser/resources/extensions/extension_list.js
+++ b/chrome/browser/resources/extensions/extension_list.js
@@ -59,8 +59,9 @@ cr.define('options', function() {
// the way at the top. That way it is clear that there are more elements
// above the element being scrolled to.
var scrollFudge = 1.2;
- document.documentElement.scrollTop = $(idToHighlight).offsetTop -
- scrollFudge * $(idToHighlight).clientHeight;
+ var scrollTop = $(idToHighlight).offsetTop - scrollFudge *
+ $(idToHighlight).clientHeight;
+ setScrollTopForDocument(document, scrollTop);
}
if (this.data_.extensions.length == 0)
@@ -336,7 +337,7 @@ cr.define('options', function() {
var pad = parseInt(getComputedStyle(node, null).marginTop, 10);
if (!isNaN(pad))
topScroll -= pad / 2;
- document.documentElement.scrollTop = topScroll;
+ setScrollTopForDocument(document, topScroll);
}
},
};
« no previous file with comments | « chrome/browser/resources/about_memory.js ('k') | chrome/browser/resources/help/help_base_page.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698