Chromium Code Reviews| Index: chrome/browser/resources/chromeos/login/oobe_welcome_dialog.js |
| diff --git a/chrome/browser/resources/chromeos/login/oobe_welcome_dialog.js b/chrome/browser/resources/chromeos/login/oobe_welcome_dialog.js |
| index da888ecdc66b912b8a7f34afbcd19ba28b863a83..f38b73d9d09fe68d79b6c08e18c113e712dda6a1 100644 |
| --- a/chrome/browser/resources/chromeos/login/oobe_welcome_dialog.js |
| +++ b/chrome/browser/resources/chromeos/login/oobe_welcome_dialog.js |
| @@ -12,6 +12,7 @@ Polymer({ |
| type: String, |
| value: '', |
| }, |
| + |
| /** |
| * Controls visibility of "Timezone" button. |
| */ |
| @@ -21,22 +22,49 @@ Polymer({ |
| }, |
| }, |
| + /** |
| + * This is stored ID of currently focused element to restore id on returns |
| + * to this dialog from Language / Timezone Selection dialogs. |
| + */ |
| + focusedElement_: 'languageSelectionButton', |
| + |
| onLanguageClicked_: function() { |
| + this.focusedElement_ = "languageSelectionButton"; |
| this.fire('language-button-clicked'); |
| }, |
| onAccessibilityClicked_: function() { |
| + this.focusedElement_ = "accessibilitySettingsButton"; |
| this.fire('accessibility-button-clicked'); |
| }, |
| onTimezoneClicked_: function() { |
| + this.focusedElement_ = "timezoneSettingsButton"; |
| this.fire('timezone-button-clicked'); |
| }, |
| onNextClicked_: function() { |
| + this.focusedElement_ = "welcomeNextButton"; |
| this.fire('next-button-clicked'); |
| }, |
| + attached: function() { |
| + this.focus(); |
| + }, |
| + |
| + focus: function() { |
| + var focused = this.$[this.focusedElement_]; |
|
stevenjb
2017/02/14 01:21:32
focusedElement
Alexander Alekseev
2017/02/14 11:59:27
Done.
|
| + if (focused) |
| + focused.focus(); |
| + }, |
| + |
| + /** |
| + * This is called from oobe_welcome when this dialog is shown. |
| + */ |
| + show: function() { |
| + this.focus(); |
| + }, |
| + |
| /** |
| * This function formats message for labels. |
| * @param String label i18n string ID. |