Commit b5b97203 authored by Fei Ling's avatar Fei Ling Committed by Commit Bot

Fix issue 958627: Users cannot switch tabs using [Enter] key on the keyboard

Bug: 958627
Change-Id: I8c16b53dc62bc2aad8b70749a0d6f28d96d80e53
Fixed: 958627
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1934318
Commit-Queue: Fei Ling <feiling@chromium.org>
Commit-Queue: Peter Kasting <pkasting@chromium.org>
Reviewed-by: default avatarPeter Kasting <pkasting@chromium.org>
Cr-Commit-Position: refs/heads/master@{#718898}
parent 3536c108
...@@ -421,7 +421,9 @@ const char* Tab::GetClassName() const { ...@@ -421,7 +421,9 @@ const char* Tab::GetClassName() const {
} }
bool Tab::OnKeyPressed(const ui::KeyEvent& event) { bool Tab::OnKeyPressed(const ui::KeyEvent& event) {
if (event.key_code() == ui::VKEY_SPACE && !IsSelected()) { if ((event.key_code() == ui::VKEY_SPACE ||
event.key_code() == ui::VKEY_RETURN) &&
!IsSelected()) {
controller_->SelectTab(this, event); controller_->SelectTab(this, event);
return true; return true;
} }
......
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