Commit a112e531 authored by Manu Cornet's avatar Manu Cornet Committed by Commit Bot

CrOS Shelf: Enable arrow key traversal in all cases

This makes arrow traversal behavior consistent with what the launcher
does, allowing left/right and up/down arrow traversal of the shelf
regardless of the shelf's orientation. Tab/right/down all have the same
effect, and shift-tab/left/up all have the same effect.

Bug: 888637
Change-Id: Ife5aaed19388ee6fde1293e1760e87cc6e22eb5e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1535462Reviewed-by: default avatarXiyuan Xia <xiyuan@chromium.org>
Reviewed-by: default avatarAlex Newcomer <newcomer@chromium.org>
Commit-Queue: Manu Cornet <manucornet@chromium.org>
Cr-Commit-Position: refs/heads/master@{#644153}
parent 15a1f1e6
...@@ -2205,11 +2205,6 @@ void ShelfView::OnShelfAlignmentChanged(aura::Window* root_window) { ...@@ -2205,11 +2205,6 @@ void ShelfView::OnShelfAlignmentChanged(aura::Window* root_window) {
if (app_list_button) if (app_list_button)
app_list_button->SchedulePaint(); app_list_button->SchedulePaint();
if (GetFocusManager()) {
GetFocusManager()->set_arrow_key_traversal_enabled_for_widget(
!shelf_->IsHorizontalAlignment());
}
AnnounceShelfAlignment(); AnnounceShelfAlignment();
} }
......
...@@ -373,6 +373,7 @@ ShelfWidget::~ShelfWidget() { ...@@ -373,6 +373,7 @@ ShelfWidget::~ShelfWidget() {
void ShelfWidget::Initialize() { void ShelfWidget::Initialize() {
// Sets initial session state to make sure the UI is properly shown. // Sets initial session state to make sure the UI is properly shown.
OnSessionStateChanged(Shell::Get()->session_controller()->GetSessionState()); OnSessionStateChanged(Shell::Get()->session_controller()->GetSessionState());
GetFocusManager()->set_arrow_key_traversal_enabled_for_widget(true);
} }
void ShelfWidget::Shutdown() { void ShelfWidget::Shutdown() {
......
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