Commit 805a7dfe authored by Quan Nguyen's avatar Quan Nguyen Committed by Commit Bot

cros: Don't attempt to focus OOBE dialog if it is not showing

This prevents an invalid request while in the lock screen, since the OOBE
dialog does not exist.

Bug: 905752
Change-Id: Ie1f820877ea659c9cbfa1e260c2e6a49776e46c9
Reviewed-on: https://chromium-review.googlesource.com/c/1338111Reviewed-by: default avatarMichael Wasserman <msw@chromium.org>
Reviewed-by: default avatarJacob Dufault <jdufault@chromium.org>
Commit-Queue: Quan Nguyen <qnnguyen@chromium.org>
Cr-Commit-Position: refs/heads/master@{#608903}
parent f14f15d3
......@@ -393,8 +393,12 @@ void LoginShelfView::AboutToRequestFocusFromTabTraversal(bool reverse) {
// Focus should leave the system tray.
Shell::Get()->system_tray_notifier()->NotifyFocusOut(reverse);
// If OOBE dialog is showing, it will take focus.
Shell::Get()->login_screen_controller()->FocusOobeDialog();
// If the dialog is hidden, let views handle the focus automatically.
// Otherwise, forward a focus request to the OOBE dialog.
if (dialog_state_ != mojom::OobeDialogState::HIDDEN &&
dialog_state_ != mojom::OobeDialogState::NONE) {
Shell::Get()->login_screen_controller()->FocusOobeDialog();
}
} else {
// Focus goes to status area.
Shelf::ForWindow(GetWidget()->GetNativeWindow())
......
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