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

Unified Diff: chrome/browser/resources/settings/search_engines_page/search_engines_page.js

Issue 2805213003: MD Settings: make iron list offset so items render onscreen (Closed)
Patch Set: Created 3 years, 8 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 | « chrome/browser/resources/settings/search_engines_page/search_engines_page.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/settings/search_engines_page/search_engines_page.js
diff --git a/chrome/browser/resources/settings/search_engines_page/search_engines_page.js b/chrome/browser/resources/settings/search_engines_page/search_engines_page.js
index 7e8c40f3a51a101d52d9fc44852524db80235205..dfdd6c5900e9c475559cbae82f9461c2caa14397 100644
--- a/chrome/browser/resources/settings/search_engines_page/search_engines_page.js
+++ b/chrome/browser/resources/settings/search_engines_page/search_engines_page.js
@@ -59,6 +59,14 @@ Polymer({
getSearchEnginesList().then(this.enginesChanged_.bind(this));
this.addWebUIListener(
'search-engines-changed', this.enginesChanged_.bind(this));
+
+ // Sets offset in iron-list that uses the page as a scrollTarget.
+ // The scrollTarget doesn't know about headers and items above the list.
+ Polymer.RenderStatus.afterNextRender(this, function() {
+ // Size of headers is constant, but defaultEngines size can vary.
+ this.$.otherEngines.scrollOffset = 184 +
Dan Beam 2017/04/07 23:32:53 this looks brittle, where does the 184 come from?
hcarmona 2017/04/08 00:02:01 Agreed, for parts that are in this file, I can add
Dan Beam 2017/04/08 00:09:44 offsetTop
hcarmona 2017/04/08 00:24:40 Sweet. Done.
+ this.$.defaultEngines.getBoundingClientRect().height;
+ });
},
/** @private */
« no previous file with comments | « chrome/browser/resources/settings/search_engines_page/search_engines_page.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698