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

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: different approach 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 203 matching lines...) Expand 10 before | Expand all | Expand 10 after
214 assert(!this.readOnlyList); 214 assert(!this.readOnlyList);
215 e.preventDefault(); 215 e.preventDefault();
216 var dialog = document.createElement('add-site-dialog'); 216 var dialog = document.createElement('add-site-dialog');
217 dialog.category = this.category; 217 dialog.category = this.category;
218 dialog.contentSetting = this.categorySubtype; 218 dialog.contentSetting = this.categorySubtype;
219 this.shadowRoot.appendChild(dialog); 219 this.shadowRoot.appendChild(dialog);
220 220
221 dialog.open(this.categorySubtype); 221 dialog.open(this.categorySubtype);
222 222
223 dialog.addEventListener('close', function() { 223 dialog.addEventListener('close', function() {
224 this.$.addSite.focus(); 224 cr.ui.focusWithoutInk(this.$.addSite);
225 dialog.remove(); 225 dialog.remove();
226 }.bind(this)); 226 }.bind(this));
227 }, 227 },
228 228
229 /** 229 /**
230 * Populate the sites list for display. 230 * Populate the sites list for display.
231 * @private 231 * @private
232 */ 232 */
233 populateList_: function() { 233 populateList_: function() {
234 if (this.allSites) { 234 if (this.allSites) {
(...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after
494 /** @private */ 494 /** @private */
495 closeActionMenu_: function() { 495 closeActionMenu_: function() {
496 this.actionMenuSite_ = null; 496 this.actionMenuSite_ = null;
497 this.activeDialogAnchor_ = null; 497 this.activeDialogAnchor_ = null;
498 var actionMenu = /** @type {!CrActionMenuElement} */ ( 498 var actionMenu = /** @type {!CrActionMenuElement} */ (
499 this.$$('dialog[is=cr-action-menu]')); 499 this.$$('dialog[is=cr-action-menu]'));
500 if (actionMenu.open) 500 if (actionMenu.open)
501 actionMenu.close(); 501 actionMenu.close();
502 }, 502 },
503 }); 503 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698