| Index: ui/webui/resources/cr_elements/cr_search_field/cr_search_field_behavior.js
|
| diff --git a/ui/webui/resources/cr_elements/cr_search_field/cr_search_field_behavior.js b/ui/webui/resources/cr_elements/cr_search_field/cr_search_field_behavior.js
|
| index 3657f79f2600b74d83b7b4e4f754df3d87c44b32..a19adc25e0885fddc4848de0badadf5d21236d6d 100644
|
| --- a/ui/webui/resources/cr_elements/cr_search_field/cr_search_field_behavior.js
|
| +++ b/ui/webui/resources/cr_elements/cr_search_field/cr_search_field_behavior.js
|
| @@ -38,6 +38,12 @@ var CrSearchFieldBehavior = {
|
| },
|
|
|
| hasSearchText: Boolean,
|
| +
|
| + /** @private */
|
| + lastValue_: {
|
| + type: String,
|
| + value: '',
|
| + },
|
| },
|
|
|
| /**
|
| @@ -74,9 +80,14 @@ var CrSearchFieldBehavior = {
|
| },
|
|
|
| onSearchTermSearch: function() {
|
| - this.hasSearchText = this.getValue() != '';
|
| + var newValue = this.getValue();
|
| + if (newValue == this.lastValue_)
|
| + return;
|
| +
|
| + this.hasSearchText = newValue != '';
|
| if (this.delegate_)
|
| - this.delegate_.onSearchTermSearch(this.getValue());
|
| + this.delegate_.onSearchTermSearch(newValue);
|
| + this.lastValue_ = newValue;
|
| },
|
|
|
| onSearchTermKeydown: function(e) {
|
|
|