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

Unified Diff: chrome/browser/resources/settings/languages_page/edit_dictionary_page.js

Issue 2808173003: [MD settings] resize iron list when template expands (Closed)
Patch Set: nits 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/settings/languages_page/edit_dictionary_page.js
diff --git a/chrome/browser/resources/settings/languages_page/edit_dictionary_page.js b/chrome/browser/resources/settings/languages_page/edit_dictionary_page.js
index b276bf483fce906e43f5b345db7d3e6f8173ba80..840368e1034c65194b055a79d36816a0369b1ce0 100644
--- a/chrome/browser/resources/settings/languages_page/edit_dictionary_page.js
+++ b/chrome/browser/resources/settings/languages_page/edit_dictionary_page.js
@@ -122,6 +122,15 @@ Polymer({
if (index == -1) {
this.languageSettingsPrivate.addSpellcheckWord(word);
this.unshift('words_', word);
+ if (this.words_.length == 1) {
+ // When adding a word to an _empty_ list, the template is expanded. This
+ // is a workaround to resize the iron-list as well.
+ // TODO(dschuyler): Remove this hack after iron-list no longer needs
+ // this workaround to update the list at the same time the template
+ // wrapping the list is expanded.
+ Polymer.dom.flush();
+ this.$$('#list').notifyResize();
+ }
}
},
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698