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

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

Issue 2022893003: [MD settings] scroll to section find host (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: review changes Created 4 years, 7 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
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..6289c4d9e124cd407e923d52aaabe71392bf2abd 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,8 @@ var RoutableBehaviorImpl = {
if (!element)
return;
- if (element.parentNode.host.scrollHeight == 0) {
+ var host = findAncestor(element, function(n) { return n.host; }).host;
+ if (host.scrollHeight == 0) {
setTimeout(pollForScrollHeight.bind(this), 100);
return;
}

Powered by Google App Engine
This is Rietveld 408576698