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

Unified Diff: chrome/browser/resources/chromeos/login/oobe_screen_oauth_enrollment.js

Issue 11421111: Fixed button focusing in OOBE screens. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Cleaned up the code. Created 8 years, 1 month 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
Index: chrome/browser/resources/chromeos/login/oobe_screen_oauth_enrollment.js
diff --git a/chrome/browser/resources/chromeos/login/oobe_screen_oauth_enrollment.js b/chrome/browser/resources/chromeos/login/oobe_screen_oauth_enrollment.js
index aa01c860669505649e8f38c54d4eabdbe5f15f20..80ae5ea6ad68a981129d67c288c77a3acbab46cd 100644
--- a/chrome/browser/resources/chromeos/login/oobe_screen_oauth_enrollment.js
+++ b/chrome/browser/resources/chromeos/login/oobe_screen_oauth_enrollment.js
@@ -110,6 +110,7 @@ cr.define('oobe', function() {
cancelButton.id = 'oauth-enroll-cancel-button';
cancelButton.textContent =
localStrings.getString('oauthEnrollCancel');
+ cancelButton.autofocus = true;
Nikita (slow) 2012/11/28 18:26:26 Not sure that we would want to autofocus this butt
mtomasz 2012/11/28 21:57:42 Done. If we want it to be focused, then it will be
Nikita (slow) 2012/11/29 16:08:11 Did you try Ctrl+Alt+E shortcut. You should launc
mtomasz 2012/11/29 19:04:28 I've tested and removed the change from this file
cancelButton.addEventListener('click', function(e) {
chrome.send('oauthEnrollClose', ['cancel']);
});
@@ -219,11 +220,16 @@ cr.define('oobe', function() {
var theStep = this.steps_[i];
var active = (theStep.name == step);
$('oauth-enroll-step-' + theStep.name).hidden = !active;
- if (active && theStep.button) {
+ if (theStep.button) {
var button = $('oauth-enroll-' + theStep.button + '-button');
- button.hidden = false;
- if (theStep.focusButton)
- button.focus();
+ button.autofocus = false;
+ if (active) {
+ button.hidden = false;
+ if (theStep.focusButton) {
+ button.focus();
+ button.autofocus = true;
+ }
+ }
}
}
},

Powered by Google App Engine
This is Rietveld 408576698