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

Side by Side Diff: ui/webui/resources/cr_elements/cr_toolbar/cr_toolbar_search_field.js

Issue 2372503002: MD WebUI: Change <cr-toolbar> clear button to not close the search field (Closed)
Patch Set: Vulcanize Created 4 years, 2 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 unified diff | Download patch
« no previous file with comments | « ui/webui/resources/cr_elements/cr_toolbar/cr_toolbar_search_field.html ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // TODO(tsergeant): Add tests for cr-toolbar-search-field. 5 // TODO(tsergeant): Add tests for cr-toolbar-search-field.
6 Polymer({ 6 Polymer({
7 is: 'cr-toolbar-search-field', 7 is: 'cr-toolbar-search-field',
8 8
9 behaviors: [CrSearchFieldBehavior], 9 behaviors: [CrSearchFieldBehavior],
10 10
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 */ 93 */
94 showSearch_: function(e) { 94 showSearch_: function(e) {
95 if (e.target != this.$.clearSearch) 95 if (e.target != this.$.clearSearch)
96 this.showingSearch = true; 96 this.showingSearch = true;
97 }, 97 },
98 98
99 /** 99 /**
100 * @param {Event} e 100 * @param {Event} e
101 * @private 101 * @private
102 */ 102 */
103 hideSearch_: function(e) { 103 clearSearch_: function(e) {
104 this.showingSearch = false; 104 this.setValue('');
105 e.stopPropagation(); 105 this.getSearchInput().focus();
106 } 106 }
107 }); 107 });
OLDNEW
« no previous file with comments | « ui/webui/resources/cr_elements/cr_toolbar/cr_toolbar_search_field.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698