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

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

Issue 2530293002: MD WebUI: Ensure the search field opens on touchscreen tap (Closed)
Patch Set: Add comment Created 4 years 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 | « chrome/browser/resources/md_history/app.crisper.js ('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 29 matching lines...) Expand all
40 }, 40 },
41 41
42 /** @private */ 42 /** @private */
43 searchFocused_: { 43 searchFocused_: {
44 type: Boolean, 44 type: Boolean,
45 value: false 45 value: false
46 }, 46 },
47 }, 47 },
48 48
49 listeners: { 49 listeners: {
50 'tap': 'showSearch_', 50 // Deliberately uses 'click' instead of 'tap' to fix crbug.com/624356.
51 'click': 'showSearch_',
51 }, 52 },
52 53
53 /** @return {!HTMLInputElement} */ 54 /** @return {!HTMLInputElement} */
54 getSearchInput: function() { 55 getSearchInput: function() {
55 return this.$.searchInput; 56 return this.$.searchInput;
56 }, 57 },
57 58
58 /** 59 /**
59 * Sets the value of the search field. Overridden from CrSearchFieldBehavior. 60 * Sets the value of the search field. Overridden from CrSearchFieldBehavior.
60 * @param {string} value 61 * @param {string} value
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 125
125 /** 126 /**
126 * @param {Event} e 127 * @param {Event} e
127 * @private 128 * @private
128 */ 129 */
129 clearSearch_: function(e) { 130 clearSearch_: function(e) {
130 this.setValue(''); 131 this.setValue('');
131 this.getSearchInput().focus(); 132 this.getSearchInput().focus();
132 } 133 }
133 }); 134 });
OLDNEW
« no previous file with comments | « chrome/browser/resources/md_history/app.crisper.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698