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

Side by Side Diff: chrome/browser/resources/settings/bluetooth_page/bluetooth_subpage.js

Issue 2817803002: MD Settings: CrOS: Focus elements on dialog close (Closed)
Patch Set: rebase 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
OLDNEW
1 // Copyright 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 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 * 'settings-bluetooth-subpage' is the settings subpage for managing bluetooth 7 * 'settings-bluetooth-subpage' is the settings subpage for managing bluetooth
8 * properties and devices. 8 * properties and devices.
9 */ 9 */
10 10
(...skipping 444 matching lines...) Expand 10 before | Expand all | Expand 10 after
455 this.dialogId_ = dialogId; 455 this.dialogId_ = dialogId;
456 return; 456 return;
457 } 457 }
458 this.dialogId_ = dialogId; 458 this.dialogId_ = dialogId;
459 // Call flush so that the dialog gets sized correctly before it is opened. 459 // Call flush so that the dialog gets sized correctly before it is opened.
460 Polymer.dom.flush(); 460 Polymer.dom.flush();
461 this.$.deviceDialog.open(); 461 this.$.deviceDialog.open();
462 }, 462 },
463 463
464 /** @private */ 464 /** @private */
465 onDialogClosed_: function() { 465 onDialogClose_: function() {
466 this.dialogId_ = ''; 466 this.dialogId_ = '';
467 this.pairingDevice_ = undefined; 467 this.pairingDevice_ = undefined;
468 // The list is dynamic so focus the first item.
469 var device = this.$$('#unpairedContainer bluetooth-device-list-item');
470 if (device)
471 device.focus();
468 }, 472 },
469 }); 473 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698