Commit 15faac6e authored by Angela Yoeurng's avatar Angela Yoeurng Committed by Commit Bot

Make pressing space trigger a button even if inline autocomplete is active

Bug: 1117639
Change-Id: I86a92c006ec77ad174bbad3bb78c1e867135c122
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2380493
Commit-Queue: Angela Yoeurng <yoangela@chromium.org>
Reviewed-by: default avatarTommy Li <tommycli@chromium.org>
Reviewed-by: default avatarOrin Jaworski <orinj@chromium.org>
Cr-Commit-Position: refs/heads/master@{#802475}
parent 72fb42bb
...@@ -2276,10 +2276,11 @@ bool OmniboxViewViews::HandleKeyEvent(views::Textfield* textfield, ...@@ -2276,10 +2276,11 @@ bool OmniboxViewViews::HandleKeyEvent(views::Textfield* textfield,
break; break;
case ui::VKEY_SPACE: { case ui::VKEY_SPACE: {
if (!control && !alt && !shift && SelectionAtEnd()) { OmniboxPopupModel* popup_model = model()->popup_model();
OmniboxPopupModel* popup_model = model()->popup_model(); if (popup_model && !control && !alt && !shift &&
if (popup_model && popup_model->TriggerSelectionAction( popup_model->selection().IsButtonFocused()) {
popup_model->selection(), event.time_stamp())) { if (popup_model->TriggerSelectionAction(popup_model->selection(),
event.time_stamp())) {
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