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

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: Make chrome/ be documentElement/body agnostic with regards to scrollTop/Left 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
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..9749cc1036370a26276b57d9a6c3003a6d22f301 100644
--- a/chrome/browser/resources/extensions/extension_list.js
+++ b/chrome/browser/resources/extensions/extension_list.js
@@ -59,8 +59,8 @@ 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;
Dan Beam 2013/11/11 23:46:46 80 col wrap
+ setScrollTopForDocument(document, scrollTop);
}
if (this.data_.extensions.length == 0)
@@ -336,7 +336,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);
}
},
};

Powered by Google App Engine
This is Rietveld 408576698