summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
authorxiyuan@chromium.org <xiyuan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-08-24 20:20:49 +0000
committerxiyuan@chromium.org <xiyuan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-08-24 20:20:49 +0000
commitc9f6b607d3bf1911d847e9428a340fe232aa4ee1 (patch)
treed0ad98c2d297008d7d88bde30b1966d1850400fd /chrome
parentf6c682a5133e568ad5d6cab27206c20c7d923a90 (diff)
downloadchromium_src-c9f6b607d3bf1911d847e9428a340fe232aa4ee1.zip
chromium_src-c9f6b607d3bf1911d847e9428a340fe232aa4ee1.tar.gz
chromium_src-c9f6b607d3bf1911d847e9428a340fe232aa4ee1.tar.bz2
[ChromeOS] Fix back tab issue in WebUI account picker.
BUG=chromium-os:18312 TEST=Verify fix for chromium-os:18312. Review URL: http://codereview.chromium.org/7717018 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@98102 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r--chrome/browser/resources/chromeos/login/user_pod_row.js11
1 files changed, 10 insertions, 1 deletions
diff --git a/chrome/browser/resources/chromeos/login/user_pod_row.js b/chrome/browser/resources/chromeos/login/user_pod_row.js
index 4f4bed0..82b78ba 100644
--- a/chrome/browser/resources/chromeos/login/user_pod_row.js
+++ b/chrome/browser/resources/chromeos/login/user_pod_row.js
@@ -382,9 +382,11 @@ cr.define('login', function() {
if (this.pods[i] == pod) {
pod.classList.remove("faded");
pod.classList.add("focused");
+ pod.tabIndex = -1; // Make it not keyboard focusable.
} else {
this.pods[i].classList.remove('focused');
this.pods[i].classList.add('faded');
+ this.pods[i].tabIndex = 0;
}
}
pod.focusInput();
@@ -401,6 +403,7 @@ cr.define('login', function() {
this.pods[i].classList.remove('focused');
this.pods[i].classList.remove('faded');
this.pods[i].activeRemoveButton = false;
+ this.pods[i].tabIndex = 0;
}
this.focusedPod_ = undefined;
}
@@ -480,7 +483,13 @@ cr.define('login', function() {
e.target.focusInput();
else
this.focusPod(e.target);
- } else if (e.target.parentNode.parentNode != this) {
+ } else if (e.target.parentNode.parentNode == this) {
+ // Focus on a control of a pod.
+ if (!e.target.parentNode.classList.contains('focused')) {
+ this.focusPod(e.target.parentNode);
+ e.target.focus();
+ }
+ } else {
// Clears pod focus when we reach here. It means new focus is neither
// on a pod nor on a button/input for a pod.
this.focusPod();