Chromium Code Reviews| 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..10e1a4b25f29ab688009226c90f0bf85d6335d73 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').fire('iron-resize'); |
|
Dan Beam
2017/04/10 23:32:49
nit: fire('iron-resize') -> notifyResize()
dschuyler
2017/04/10 23:36:25
Done.
|
| + } |
| } |
| }, |