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

Unified Diff: chrome/browser/resources/help/help_base_page.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
Index: chrome/browser/resources/help/help_base_page.js
diff --git a/chrome/browser/resources/help/help_base_page.js b/chrome/browser/resources/help/help_base_page.js
index f07a9f1e0cd58df9eaf3c7ef0ce582f47325e0cf..15c3224ab43d3a6b4df66caf2f4ce0ec84592b75 100644
--- a/chrome/browser/resources/help/help_base_page.js
+++ b/chrome/browser/resources/help/help_base_page.js
@@ -115,13 +115,14 @@ cr.define('help', function() {
* @private
*/
freeze_: function(freeze) {
+ var scrollLeft = scrollLeftForDocument(document);
if (freeze) {
- this.lastScrollTop = document.documentElement.scrollTop;
+ this.lastScrollTop = scrollTopForDocument(document);
document.body.style.overflow = 'hidden';
- window.scroll(document.documentElement.scrollLeft, 0);
+ window.scroll(scrollLeft, 0);
} else {
document.body.style.overflow = 'auto';
- window.scroll(document.documentElement.scrollLeft, this.lastScrollTop);
+ window.scroll(scrollLeft, this.lastScrollTop);
}
},
« no previous file with comments | « chrome/browser/resources/extensions/extension_list.js ('k') | chrome/browser/resources/ntp_android/new_tab.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698