New issue
Advanced search Search tips

Issue 768076 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Oct 2017
Cc:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 1
Type: Bug



Sign in to add a comment

Adjust the user pod tab order on views-based lock screen

Project Member Reported by wzang@chromium.org, Sep 22 2017

Issue description

On view-based lock screen, the correct tab order should be password field -> drop down menu. Right now it is the opposite.
 

Comment 1 by wzang@chromium.org, Oct 14 2017

Cc: -jdufault@chromium.org
Owner: jdufault@chromium.org
PTAL. Here's what I've tried:

1) SetNextFocusableView and SetPreviousFocusableView can work within a single user pod (IMO adding SetPreviousFocusableView is a hack itself), but when the focus is about to leave the shelf/system tray, a dummy FocusTraversable still cannot find the correct view (i.e. password view, but user dropdown is always the first focusable view).

We have to allow LoginContentsView to directly forward the focus to the primary_auth_->password_view(). But in the case of reverse tabbing, it has to additionally check how many users there are, and may forward the focus to 1) the last small user pod, 2) the second auth user, or 3) the primary auth user. And it should tell the focus direction to the user view as well. Not a good approach IMO.

2) I've also written a custom FocusSearch for LoginAuthUserView, but later realize we'll need another FocusSearch for the LoginContentsView itself: and we should use the custom FocusSearch when we are within the LoginAuthUserView, and goes back to use the overall FocusSearch when we switch in between different pods. Currently we can't do this cleanly with FocusManager.

I'm wondering if it's worthwhile: I believe the user view is added before password view for convenience of layout. Can we write a custom LayoutManager instead? Or, we should change/refactor FocusManager. Or, we admit it's a hack and do something similar with the new launcher (AFAIK the new launcher directly handles the tab event for corner cases.) 
Project Member

Comment 2 by bugdroid1@chromium.org, Oct 20 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/525a1fd14f43cbc9379dff95c69620702f1bd7c4

commit 525a1fd14f43cbc9379dff95c69620702f1bd7c4
Author: Jacob Dufault <jdufault@google.com>
Date: Fri Oct 20 17:00:35 2017

cros: Fix tab order on views-based lock screen.

It ended up being complex to use SetNextFocusableView (details in bug),
so separate the order we add views from the order we render views in
LoginAuthUserView.

Bug:  768076 
Change-Id: I986eee1cce62ab8d8ab80ebbb5c28f20fbd8d13d
Reviewed-on: https://chromium-review.googlesource.com/729200
Reviewed-by: Xiyuan Xia <xiyuan@chromium.org>
Commit-Queue: Jacob Dufault <jdufault@chromium.org>
Cr-Commit-Position: refs/heads/master@{#510469}
[modify] https://crrev.com/525a1fd14f43cbc9379dff95c69620702f1bd7c4/ash/login/ui/lock_screen_sanity_unittest.cc
[modify] https://crrev.com/525a1fd14f43cbc9379dff95c69620702f1bd7c4/ash/login/ui/login_auth_user_view.cc
[modify] https://crrev.com/525a1fd14f43cbc9379dff95c69620702f1bd7c4/ash/login/ui/login_auth_user_view.h
[modify] https://crrev.com/525a1fd14f43cbc9379dff95c69620702f1bd7c4/ash/login/ui/login_password_view.cc
[modify] https://crrev.com/525a1fd14f43cbc9379dff95c69620702f1bd7c4/ash/login/ui/pin_keyboard_animation.cc

Cc: r...@chromium.org wzang@chromium.org
Status: Fixed (was: Assigned)

Comment 4 by dchan@chromium.org, Jan 22 2018

Status: Archived (was: Fixed)

Comment 5 by dchan@chromium.org, Jan 23 2018

Status: Fixed (was: Archived)

Sign in to add a comment