Commit 59b02886 authored by Justin Donnelly's avatar Justin Donnelly Committed by Commit Bot

[omnibox] Trigger keyword mode on keyword button focus.

This preserves the existing behavior where you can focus the omnibox and
<text matching keyword><tab key> enters keyword mode.

Bug: 1046523
Change-Id: I2e7d380cf31938e056b90b072df54e21e16ad348
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2346732
Commit-Queue: Justin Donnelly <jdonnelly@chromium.org>
Reviewed-by: default avatarOrin Jaworski <orinj@chromium.org>
Cr-Commit-Position: refs/heads/master@{#798518}
parent 77d569ef
...@@ -48,7 +48,8 @@ bool OmniboxPopupModel::Selection::operator<(const Selection& b) const { ...@@ -48,7 +48,8 @@ bool OmniboxPopupModel::Selection::operator<(const Selection& b) const {
} }
bool OmniboxPopupModel::Selection::IsChangeToKeyword(Selection from) const { bool OmniboxPopupModel::Selection::IsChangeToKeyword(Selection from) const {
return state == KEYWORD_MODE && from.state != KEYWORD_MODE; return (state == KEYWORD_MODE || state == FOCUSED_BUTTON_KEYWORD) &&
!(from.state == KEYWORD_MODE || from.state == FOCUSED_BUTTON_KEYWORD);
} }
bool OmniboxPopupModel::Selection::IsButtonFocused() const { bool OmniboxPopupModel::Selection::IsButtonFocused() const {
......
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