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

Unified Diff: ui/webui/resources/cr_elements/cr_search_field/cr_search_field.js

Issue 2180843006: MD WebUI: Remove local DOM access from CrSearchFieldBehavior (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@cr_search_field_clear
Patch Set: Vulcanize Created 4 years, 5 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
Index: ui/webui/resources/cr_elements/cr_search_field/cr_search_field.js
diff --git a/ui/webui/resources/cr_elements/cr_search_field/cr_search_field.js b/ui/webui/resources/cr_elements/cr_search_field/cr_search_field.js
index e028176f525f921297a7f76d48da79a6ac8842b1..e9a7e3e17869d733801e43972bd0329d2673eb1a 100644
--- a/ui/webui/resources/cr_elements/cr_search_field/cr_search_field.js
+++ b/ui/webui/resources/cr_elements/cr_search_field/cr_search_field.js
@@ -11,10 +11,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 */

Powered by Google App Engine
This is Rietveld 408576698