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

Side by Side Diff: chrome/browser/resources/chromeos/login/oobe_dialog.js

Issue 2818633003: ChromeOS OOBE: fix JS crash in oobe-dialog focus behavior. (Closed)
Patch Set: 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 | « 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 Polymer({ 5 Polymer({
6 is: 'oobe-dialog', 6 is: 'oobe-dialog',
7 7
8 properties: { 8 properties: {
9 /** 9 /**
10 * Controls visibility of the bottom-buttons element. 10 * Controls visibility of the bottom-buttons element.
(...skipping 21 matching lines...) Expand all
32 TODO (alemate): fix this once event flow is updated. 32 TODO (alemate): fix this once event flow is updated.
33 */ 33 */
34 this.show(); 34 this.show();
35 }, 35 },
36 36
37 /** 37 /**
38 * This is called from oobe_welcome when this dialog is shown. 38 * This is called from oobe_welcome when this dialog is shown.
39 */ 39 */
40 show: function() { 40 show: function() {
41 var focusedElements = this.getElementsByClassName('focus-on-show'); 41 var focusedElements = this.getElementsByClassName('focus-on-show');
42 if (focusedElements) 42 if (focusedElements.length > 0)
43 focusedElements[0].focus(); 43 focusedElements[0].focus();
44 44
45 this.fire('show-dialog'); 45 this.fire('show-dialog');
46 }, 46 },
47 }); 47 });
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