Chromium Code Reviews| Index: chrome/browser/resources/hotword_audio_verification/flow.js |
| diff --git a/chrome/browser/resources/hotword_audio_verification/flow.js b/chrome/browser/resources/hotword_audio_verification/flow.js |
| index 8a7632698ee99e8d1054d024d626ead2b926fc04..091b1ee1bdd82f6c114a52a744afc2ca430a4bd2 100644 |
| --- a/chrome/browser/resources/hotword_audio_verification/flow.js |
| +++ b/chrome/browser/resources/hotword_audio_verification/flow.js |
| @@ -545,12 +545,15 @@ |
| /** |
| * Displays the current step. If the current step is not the first step, |
| - * also hides the previous step. |
| + * also hides the previous step. Focuses the current step's first button. |
| * @private |
| */ |
| Flow.prototype.showStep_ = function() { |
| - var currentStep = this.currentFlow_[this.currentStepIndex_]; |
| - document.getElementById(currentStep).hidden = false; |
| + var currentStepId = this.currentFlow_[this.currentStepIndex_]; |
| + var currentStep = document.getElementById(currentStepId); |
| + currentStep.hidden = false; |
| + |
| + cr.ui.setInitialFocus(currentStep.querySelector('.buttonbar')); |
|
Dan Beam
2015/03/19 02:38:47
this kinda defeats the purpose. you should be pas
kcarattini
2015/03/19 02:59:39
Done.
|
| var previousStep = null; |
| if (this.currentStepIndex_ > 0) |