Index: ui/login/account_picker/user_pod_row.js |
diff --git a/ui/login/account_picker/user_pod_row.js b/ui/login/account_picker/user_pod_row.js |
index d4fd53a524e08184975591c09a676f8f5b18ab97..0e85fcff4a3c6712cda07e27e9955778565686b2 100644 |
--- a/ui/login/account_picker/user_pod_row.js |
+++ b/ui/login/account_picker/user_pod_row.js |
@@ -2727,8 +2727,10 @@ cr.define('login', function() { |
* @param {UserPod=} podToFocus User pod to focus (undefined clears focus). |
* @param {boolean=} opt_force If true, forces focus update even when |
* podToFocus is already focused. |
+ * @param {boolean=} opt_prevent_focus_input If true, do not focus on input |
+ * box. |
*/ |
- focusPod: function(podToFocus, opt_force) { |
+ focusPod: function(podToFocus, opt_force, opt_prevent_focus_input) { |
if (this.isFocused(podToFocus) && !opt_force) { |
// Calling focusPod w/o podToFocus means reset. |
if (!podToFocus) |
@@ -2772,7 +2774,9 @@ cr.define('login', function() { |
podToFocus.classList.add('focused'); |
if (!podToFocus.multiProfilesPolicyApplied) { |
podToFocus.classList.toggle('signing-in', false); |
- podToFocus.focusInput(); |
+ if (!opt_prevent_focus_input) { |
+ podToFocus.focusInput(); |
+ } |
} else { |
podToFocus.userTypeBubbleElement.classList.add('bubble-shown'); |
podToFocus.focus(); |
@@ -2997,7 +3001,11 @@ cr.define('login', function() { |
// Focus on a control of a pod but not on the action area button. |
if (!pod.classList.contains('focused') && |
!e.target.classList.contains('action-box-button')) { |
- this.focusPod(pod); |
+ if (e.target == pod.actionBoxAreaElement) { |
+ this.focusPod(pod, false, true); |
+ } else { |
+ this.focusPod(pod); |
+ } |
pod.userTypeBubbleElement.classList.remove('bubble-shown'); |
e.target.focus(); |
} |