Chromium Code Reviews| Index: chrome/browser/resources/options/autofill_options_list.js |
| diff --git a/chrome/browser/resources/options/autofill_options_list.js b/chrome/browser/resources/options/autofill_options_list.js |
| index 86aaae84aa536f775996e963402a9d6b783e822d..2d343bdd9617678f933091aba105186468cece97 100644 |
| --- a/chrome/browser/resources/options/autofill_options_list.js |
| +++ b/chrome/browser/resources/options/autofill_options_list.js |
| @@ -169,7 +169,7 @@ cr.define('options.autofillOptions', function() { |
| */ |
| onEditCommitted_: function(e) { |
| var i = this.list.items.indexOf(this); |
| - if (i < 0 || i >= this.list.dataModel.length) |
| + if (i < 0 || i >= this.list.dataModel.length || !this.input.value.length) |
| return; |
| if (this.input.value && |
| @@ -180,7 +180,6 @@ cr.define('options.autofillOptions', function() { |
| this.list.validateAndSave(i, 0, this.input.value); |
| } else { |
| this.input.value = ''; |
| - this.list.dataModel.updateIndex(i); |
| } |
| }, |
| }; |
| @@ -307,6 +306,11 @@ cr.define('options.autofillOptions', function() { |
| this.dataModel.splice(index, 1); |
| }, |
| + /** @inheritDoc */ |
| + shouldFocusPlaceholder: function() { |
|
csilv
2011/08/10 17:55:25
odd that we consider "placeholder" a word? not su
|
| + return false; |
| + }, |
| + |
| /** |
| * Called when a new list item should be validated; subclasses are |
| * responsible for implementing if validation is required. |