Commit 3ac52ccb authored by Angela Yoeurng's avatar Angela Yoeurng Committed by Commit Bot

[omnibox] Update Omnibox Edit Model if moving away from button selection

This fixes a bug that caused accessibility voiceovers to be different
when navigating forwards vs backwards using the keyboard.

Bug: 1099806
Change-Id: I9cc6a2ec9a4dfdf84a41aaf731914e64e77acb04
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2303461Reviewed-by: default avatarTommy Li <tommycli@chromium.org>
Commit-Queue: Angela Yoeurng <yoangela@chromium.org>
Cr-Commit-Position: refs/heads/master@{#789619}
parent 98fead43
...@@ -178,9 +178,9 @@ void OmniboxPopupModel::SetSelection(Selection new_selection, ...@@ -178,9 +178,9 @@ void OmniboxPopupModel::SetSelection(Selection new_selection,
base::string16(), keyword, is_keyword_hint, base::string16(), keyword, is_keyword_hint,
base::string16()); base::string16());
} else if (old_selection.line != selection_.line || } else if (old_selection.line != selection_.line ||
old_selection.state == FOCUSED_BUTTON_HEADER) { old_selection.IsButtonFocused()) {
// Otherwise, only update the edit model for line number changes, or // Otherwise, only update the edit model for line number changes, or
// when the old selection was a Header. Updating the edit model for every // when the old selection was a button. Updating the edit model for every
// state change breaks keyword mode. // state change breaks keyword mode.
if (reset_to_default) { if (reset_to_default) {
edit_model_->OnPopupDataChanged( edit_model_->OnPopupDataChanged(
......
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