Index: chrome/browser/resources/options/options_page.js |
diff --git a/chrome/browser/resources/options/options_page.js b/chrome/browser/resources/options/options_page.js |
index e837c2532440ad11e3a12e27257f9b3cc4c37b07..befb7c813981bc869dfda9aa7f179a426fd178f3 100644 |
--- a/chrome/browser/resources/options/options_page.js |
+++ b/chrome/browser/resources/options/options_page.js |
@@ -204,7 +204,7 @@ cr.define('options', function() { |
var container = $('page-container'); |
var scrollTop = container.oldScrollTop || 0; |
container.oldScrollTop = undefined; |
- window.scroll(document.documentElement.scrollLeft, scrollTop); |
+ window.scroll(scrollLeftForDocument(document), scrollTop); |
}; |
/** |
@@ -611,7 +611,7 @@ cr.define('options', function() { |
if (freeze) { |
// Lock the width, since auto width computation may change. |
container.style.width = window.getComputedStyle(container).width; |
- container.oldScrollTop = document.documentElement.scrollTop; |
+ container.oldScrollTop = scrollTopForDocument(document); |
container.classList.add('frozen'); |
var verticalPosition = |
container.getBoundingClientRect().top - container.oldScrollTop; |
@@ -703,8 +703,8 @@ cr.define('options', function() { |
if (isRTL()) { |
e.style.right = OptionsPage.horizontalOffset + 'px'; |
} else { |
- e.style.left = OptionsPage.horizontalOffset - |
- document.documentElement.scrollLeft + 'px'; |
+ var scrollLeft = scrollLeftForDocument(document); |
+ e.style.left = OptionsPage.horizontalOffset - scrollLeft + 'px'; |
} |
}; |