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

Side by Side Diff: chrome/browser/resources/settings/search_engines_page/search_engines_page.js

Issue 2793463002: MD Settings: Restore focus after closing various dialogs. (Closed)
Patch Set: Nits. Created 3 years, 8 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 | « chrome/browser/resources/settings/search_engines_page/search_engine_entry.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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 /** 5 /**
6 * @fileoverview 'settings-search-engines-page' is the settings page 6 * @fileoverview 'settings-search-engines-page' is the settings page
7 * containing search engines settings. 7 * containing search engines settings.
8 */ 8 */
9 Polymer({ 9 Polymer({
10 is: 'settings-search-engines-page', 10 is: 'settings-search-engines-page',
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 onAddSearchEngineTap_: function(e) { 75 onAddSearchEngineTap_: function(e) {
76 e.preventDefault(); 76 e.preventDefault();
77 this.showAddSearchEngineDialog_ = true; 77 this.showAddSearchEngineDialog_ = true;
78 this.async(function() { 78 this.async(function() {
79 var dialog = this.$$('settings-search-engine-dialog'); 79 var dialog = this.$$('settings-search-engine-dialog');
80 // Register listener to detect when the dialog is closed. Flip the boolean 80 // Register listener to detect when the dialog is closed. Flip the boolean
81 // once closed to force a restamp next time it is shown such that the 81 // once closed to force a restamp next time it is shown such that the
82 // previous dialog's contents are cleared. 82 // previous dialog's contents are cleared.
83 dialog.addEventListener('close', function() { 83 dialog.addEventListener('close', function() {
84 this.showAddSearchEngineDialog_ = false; 84 this.showAddSearchEngineDialog_ = false;
85 this.$.addSearchEngine.focus();
85 }.bind(this)); 86 }.bind(this));
86 }.bind(this)); 87 }.bind(this));
87 }, 88 },
88 89
89 /** @private */ 90 /** @private */
90 computeShowExtensionsList_: function() { 91 computeShowExtensionsList_: function() {
91 return this.extensions.length > 0; 92 return this.extensions.length > 0;
92 }, 93 },
93 }); 94 });
OLDNEW
« no previous file with comments | « chrome/browser/resources/settings/search_engines_page/search_engine_entry.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698