Chromium Code Reviews| 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..5f9f92c0005edeff30477b6eb4d2a9af5c411f20 100644 |
| --- a/chrome/browser/resources/options/options_page.js |
| +++ b/chrome/browser/resources/options/options_page.js |
| @@ -204,7 +204,8 @@ cr.define('options', function() { |
| var container = $('page-container'); |
| var scrollTop = container.oldScrollTop || 0; |
| container.oldScrollTop = undefined; |
| - window.scroll(document.documentElement.scrollLeft, scrollTop); |
| + var scrollLeft = scrollLeftForDocument(document); |
| + window.scroll(scrollLeft, scrollTop); |
|
Dan Beam
2013/11/13 23:31:07
nit: window.scroll(scrollLeftForDocument(document)
|
| }; |
| /** |
| @@ -611,7 +612,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 +704,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'; |
| } |
| }; |