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

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

Issue 2797133007: [MD settings] add custom spelling words to top of list (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 | « 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 162641be47e6a85d8fe0877cf8e19d1b917e6e2f..b276bf483fce906e43f5b345db7d3e6f8173ba80 100644
--- a/chrome/browser/resources/settings/languages_page/edit_dictionary_page.js
+++ b/chrome/browser/resources/settings/languages_page/edit_dictionary_page.js
@@ -121,15 +121,8 @@ Polymer({
var index = this.words_.indexOf(word);
if (index == -1) {
this.languageSettingsPrivate.addSpellcheckWord(word);
- this.push('words_', word);
- index = this.words_.length - 1;
+ this.unshift('words_', word);
}
-
- // Scroll to the word (usually the bottom, or to the index if the word
- // is already present).
- this.async(function(){
- this.root.querySelector('#list').scrollToIndex(index);
- });
},
/**
« 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