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

Unified Diff: chrome/browser/resources/hotword_audio_verification/flow.js

Issue 1011283003: Hotword: Make the opt-in flow tab ordering more intuitive (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Review comments Created 5 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/resources/hotword_audio_verification/main.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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)
« no previous file with comments | « no previous file | chrome/browser/resources/hotword_audio_verification/main.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698