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

Unified Diff: ui/login/account_picker/user_pod_row.js

Issue 1210013004: Fix vk flashing after click the action box are element Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 6 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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();
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698