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

Unified Diff: chrome/browser/resources/settings/settings_page/main_page_behavior.js

Issue 2039603002: MD Settings: Fix scroll to section (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: test coverage Created 4 years, 6 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 | chrome/chrome_tests.gypi » ('j') | chrome/test/data/webui/settings/navigation_browsertest.js » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/settings/settings_page/main_page_behavior.js
diff --git a/chrome/browser/resources/settings/settings_page/main_page_behavior.js b/chrome/browser/resources/settings/settings_page/main_page_behavior.js
index 130a2881cdca9fca8e0c2f5934194daa3c515c59..ce1e943f7f4eb4ace523905e6a708e337ecefdac 100644
--- a/chrome/browser/resources/settings/settings_page/main_page_behavior.js
+++ b/chrome/browser/resources/settings/settings_page/main_page_behavior.js
@@ -346,7 +346,7 @@ var RoutableBehaviorImpl = {
if (!element)
return;
- if (element.parentNode.host.scrollHeight == 0) {
+ if (this.scrollHeight == 0) {
setTimeout(pollForScrollHeight.bind(this), 100);
return;
}
@@ -380,7 +380,7 @@ var RoutableBehaviorImpl = {
var section = this.getSection_(newRoute.section);
if (section)
this.expandSection(section);
- } else if (newRoute && newRoute.section) {
+ } else if (newRoute && newRoute.section && !oldRouteIsSubpage) {
dschuyler 2016/06/06 23:51:42 What is this addition addressing?
michaelpg 2016/06/07 02:55:05 Warning: wall of text that I'm publishing for my n
dschuyler 2016/06/08 00:35:05 That's a lot of indirect logic for folks following
this.scrollToSection_();
}
},
« no previous file with comments | « no previous file | chrome/chrome_tests.gypi » ('j') | chrome/test/data/webui/settings/navigation_browsertest.js » ('J')

Powered by Google App Engine
This is Rietveld 408576698