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

Side by Side Diff: chrome/browser/resources/settings/site_settings/site_list.js

Issue 2842303004: MD Settings: update dialogs to focus without ink when using mouse (Closed)
Patch Set: merge Created 3 years, 7 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
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 6 * @fileoverview
7 * 'site-list' shows a list of Allowed and Blocked sites for a given 7 * 'site-list' shows a list of Allowed and Blocked sites for a given
8 * category. 8 * category.
9 */ 9 */
10 Polymer({ 10 Polymer({
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after
215 assert(!this.readOnlyList); 215 assert(!this.readOnlyList);
216 e.preventDefault(); 216 e.preventDefault();
217 var dialog = document.createElement('add-site-dialog'); 217 var dialog = document.createElement('add-site-dialog');
218 dialog.category = this.category; 218 dialog.category = this.category;
219 dialog.contentSetting = this.categorySubtype; 219 dialog.contentSetting = this.categorySubtype;
220 this.shadowRoot.appendChild(dialog); 220 this.shadowRoot.appendChild(dialog);
221 221
222 dialog.open(this.categorySubtype); 222 dialog.open(this.categorySubtype);
223 223
224 dialog.addEventListener('close', function() { 224 dialog.addEventListener('close', function() {
225 this.$.addSite.focus(); 225 cr.ui.focusWithoutInk(assert(this.$.addSite));
226 dialog.remove(); 226 dialog.remove();
227 }.bind(this)); 227 }.bind(this));
228 }, 228 },
229 229
230 /** 230 /**
231 * Populate the sites list for display. 231 * Populate the sites list for display.
232 * @private 232 * @private
233 */ 233 */
234 populateList_: function() { 234 populateList_: function() {
235 if (this.allSites) { 235 if (this.allSites) {
(...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after
495 /** @private */ 495 /** @private */
496 closeActionMenu_: function() { 496 closeActionMenu_: function() {
497 this.actionMenuSite_ = null; 497 this.actionMenuSite_ = null;
498 this.activeDialogAnchor_ = null; 498 this.activeDialogAnchor_ = null;
499 var actionMenu = /** @type {!CrActionMenuElement} */ ( 499 var actionMenu = /** @type {!CrActionMenuElement} */ (
500 this.$$('dialog[is=cr-action-menu]')); 500 this.$$('dialog[is=cr-action-menu]'));
501 if (actionMenu.open) 501 if (actionMenu.open)
502 actionMenu.close(); 502 actionMenu.close();
503 }, 503 },
504 }); 504 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698