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

Unified Diff: chrome/browser/resources/uber/uber_utils.js

Issue 26719003: Fix cross-frame horizontal scrolling on the uber page. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 2 months 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: chrome/browser/resources/uber/uber_utils.js
diff --git a/chrome/browser/resources/uber/uber_utils.js b/chrome/browser/resources/uber/uber_utils.js
index 5afc7e08bcb22917b45b0102fb1cfbea57f26d09..971b15b1ec22450eac3c28c28e9e1129e0192fb9 100644
--- a/chrome/browser/resources/uber/uber_utils.js
+++ b/chrome/browser/resources/uber/uber_utils.js
@@ -39,7 +39,7 @@ cr.define('uber', function() {
* @private
*/
function handleScroll() {
- var offset = document.body.scrollLeft * -1;
+ var offset = document.documentElement.scrollLeft * -1;
for (var i = 0; i < headerElements.length; i++) {
// As a workaround for http://crbug.com/231830, set the transform to
// 'none' rather than 0px.
@@ -47,7 +47,7 @@ cr.define('uber', function() {
'translateX(' + offset + 'px)' : 'none';
}
- invokeMethodOnParent('adjustToScroll', document.body.scrollLeft);
+ invokeMethodOnParent('adjustToScroll', document.documentElement.scrollLeft);
};
/**
@@ -67,7 +67,7 @@ cr.define('uber', function() {
* @private
*/
function handleFrameSelected() {
- document.body.scrollLeft = 0;
+ document.documentElement.scrollLeft = 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