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

Side by Side Diff: chrome/browser/resources/print_preview/settings/advanced_settings/advanced_settings_item.js

Issue 839453006: Do not show search bubble on printer advanced options text field change. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 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 | « no previous file | 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 cr.define('print_preview', function() { 5 cr.define('print_preview', function() {
6 'use strict'; 6 'use strict';
7 7
8 /** 8 /**
9 * Component that renders a destination item in a destination list. 9 * Component that renders a destination item in a destination list.
10 * @param {!cr.EventTarget} eventTarget Event target to dispatch selection 10 * @param {!cr.EventTarget} eventTarget Event target to dispatch selection
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 /** 144 /**
145 * Called when the text element value is changed. 145 * Called when the text element value is changed.
146 * @private 146 * @private
147 */ 147 */
148 onTextInput_: function() { 148 onTextInput_: function() {
149 this.selectedValue_ = this.text_.value || null; 149 this.selectedValue_ = this.text_.value || null;
150 150
151 if (this.query_) { 151 if (this.query_) {
152 var optionMatches = (this.selectedValue_ || '').match(this.query_); 152 var optionMatches = (this.selectedValue_ || '').match(this.query_);
153 // Even if there's no match anymore, keep the item visible to do not 153 // Even if there's no match anymore, keep the item visible to do not
154 // surprise user. 154 // surprise user. Even if there's a match, do not show the bubble, user
155 if (optionMatches) 155 // is already aware that this option is visible and matches the search.
156 this.showSearchBubble_(optionMatches[0]); 156 // Showing the bubble will only create a distraction by moving UI
157 else 157 // elements around.
158 if (!optionMatches)
158 this.hideSearchBubble_(); 159 this.hideSearchBubble_();
159 } 160 }
160 }, 161 },
161 162
162 /** 163 /**
163 * @param {!Object} entity Entity to get the display name for. Entity in 164 * @param {!Object} entity Entity to get the display name for. Entity in
164 * is either a vendor capability or vendor capability option. 165 * is either a vendor capability or vendor capability option.
165 * @return {string} The entity display name. 166 * @return {string} The entity display name.
166 * @private 167 * @private
167 */ 168 */
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
309 } 310 }
310 }); 311 });
311 } 312 }
312 }; 313 };
313 314
314 // Export 315 // Export
315 return { 316 return {
316 AdvancedSettingsItem: AdvancedSettingsItem 317 AdvancedSettingsItem: AdvancedSettingsItem
317 }; 318 };
318 }); 319 });
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698