| 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 f969be3f83ee10a663cb940d1e532f2c4c16cb39..2ee303968e6fdad9b71eb422e04e9842fe2c37c6 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.
|
| */
|
| @@ -26,19 +27,29 @@ Polymer({
|
| debuggingLinkVisible: Boolean,
|
| },
|
|
|
| + /**
|
| + * 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');
|
| },
|
|
|
| @@ -47,6 +58,23 @@ Polymer({
|
| ['connect-debugging-features']);
|
| },
|
|
|
| + attached: function() {
|
| + this.focus();
|
| + },
|
| +
|
| + focus: function() {
|
| + var focusedElement = this.$[this.focusedElement_];
|
| + if (focusedElement)
|
| + focusedElement.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.
|
|
|