| 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 d6a68d5919f0a622933cadaf8c3a1f65d3c0a3f5..51304c0b2af870166ce30f168e1ea999478440f0 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
|
| @@ -35,10 +35,17 @@ var CrSearchFieldBehavior = {
|
| },
|
|
|
| /**
|
| + * @abstract
|
| + * @return {!HTMLInputElement} The input field element the behavior should
|
| + * use.
|
| + */
|
| + getSearchInput: function() {},
|
| +
|
| + /**
|
| * @return {string} The value of the search field.
|
| */
|
| getValue: function() {
|
| - return this.$.searchInput.value;
|
| + return this.getSearchInput().value;
|
| },
|
|
|
| /**
|
| @@ -48,7 +55,7 @@ var CrSearchFieldBehavior = {
|
| setValue: function(value) {
|
| // Use bindValue when setting the input value so that changes propagate
|
| // correctly.
|
| - this.$.searchInput.bindValue = value;
|
| + this.getSearchInput().bindValue = value;
|
| this.onValueChanged_(value);
|
| },
|
|
|
| @@ -59,7 +66,7 @@ var CrSearchFieldBehavior = {
|
|
|
| /** @private */
|
| focus_: function() {
|
| - this.$.searchInput.focus();
|
| + this.getSearchInput().focus();
|
| },
|
|
|
| onSearchTermSearch: function() {
|
| @@ -93,11 +100,6 @@ var CrSearchFieldBehavior = {
|
| }
|
|
|
| this.setValue('');
|
| - this.$.searchInput.blur();
|
| - },
|
| -
|
| - /** @return {boolean} */
|
| - isSearchFocused: function() {
|
| - return this.$.searchTerm.focused;
|
| + this.getSearchInput().blur();
|
| }
|
| };
|
|
|