Commit a77ef710 authored by Wenzhao Zang's avatar Wenzhao Zang Committed by Commit Bot

cros: Do not force focus for user pods without password field

It should be fine to remove the entire code path within |focusInput|
with |opt_ensureFocus| == true, since the original bug crbug.com/725622
was fixed by reverting another CL. However to be safe, this CL only
affects user pods without password input field.

The cause of the bug might be: when clicking the pod that requires
online sign-in (ie. the pod that does not display a password field),
the focus immediately goes to the GAIA sign-in page, so the pod never
gets the chance to remove the focus listener. When the GAIA page is
closed, the pod is still trying to steal focus. It's observed that the
issue doesn't exist if the GAIA page is not opened.

Bug: 778371
Change-Id: Ib4f39798fa60bc0cf72bbfd67c7fe8e997f7eedb
Reviewed-on: https://chromium-review.googlesource.com/950475Reviewed-by: default avatarAlexander Alekseev <alemate@chromium.org>
Commit-Queue: Wenzhao (Colin) Zang <wzang@chromium.org>
Cr-Commit-Position: refs/heads/master@{#541628}
parent 434e2459
......@@ -1573,7 +1573,7 @@ cr.define('login', function() {
// global focus change event. Sometimes focus requests are ignored while
// loading the page. See crbug.com/725622.
if (opt_ensureFocus) {
var INTERVAL_REPEAT_MS = 10
var INTERVAL_REPEAT_MS = 10;
var input = this.mainInput;
var intervalId = setInterval(function() {
input.focus();
......@@ -1756,8 +1756,8 @@ cr.define('login', function() {
this.classList.toggle('signing-in', false);
if (takeFocus) {
if (!this.multiProfilesPolicyApplied) {
// This will set a custom tab order.
this.focusInput(true /*opt_ensureFocus*/);
this.focusInput(
this.mainInput.tagName == 'INPUT' /*opt_ensureFocus*/);
}
}
else
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment