| Index: chrome/browser/resources/md_downloads/crisper.js
|
| diff --git a/chrome/browser/resources/md_downloads/crisper.js b/chrome/browser/resources/md_downloads/crisper.js
|
| index 0677f9144202cc2a4c0b582afd1028661c746aa2..76ba86968342ede51226fff435a0a8400fe58963 100644
|
| --- a/chrome/browser/resources/md_downloads/crisper.js
|
| +++ b/chrome/browser/resources/md_downloads/crisper.js
|
| @@ -10507,10 +10507,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;
|
| },
|
|
|
| /**
|
| @@ -10520,7 +10527,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);
|
| },
|
|
|
| @@ -10531,7 +10538,7 @@ var CrSearchFieldBehavior = {
|
|
|
| /** @private */
|
| focus_: function() {
|
| - this.$.searchInput.focus();
|
| + this.getSearchInput().focus();
|
| },
|
|
|
| onSearchTermSearch: function() {
|
| @@ -10565,12 +10572,7 @@ var CrSearchFieldBehavior = {
|
| }
|
|
|
| this.setValue('');
|
| - this.$.searchInput.blur();
|
| - },
|
| -
|
| - /** @return {boolean} */
|
| - isSearchFocused: function() {
|
| - return this.$.searchTerm.focused;
|
| + this.getSearchInput().blur();
|
| }
|
| };
|
| (function() {
|
| @@ -11347,10 +11349,15 @@ var SearchField = Polymer({
|
| value_: String,
|
| },
|
|
|
| + /** @return {!HTMLInputElement} */
|
| + getSearchInput: function() {
|
| + return this.$.searchInput;
|
| + },
|
| +
|
| /** @private */
|
| clearSearch_: function() {
|
| this.setValue('');
|
| - this.$.searchInput.focus();
|
| + this.getSearchInput().focus();
|
| },
|
|
|
| /** @private */
|
|
|