DescriptionDon't call AcceptCurrentInstantPreview() when the user hits Tab.
This call is meant to commit the Instant overlay (preview). However, the overlay
never shows if the omnibox dropdown is not open. So, either the Tab is handled
by the omnibox edit (to enter keyword mode or to move down the list of dropdown
suggestions) or there's no overlay to commit. I.e., this call never succeeds.
So, it's entirely useless and can be removed.
Removing it does help fix a bug, though. In extended mode, Instant could be
talking to the active tab instead of an overlay, with the dropdown closed. Here,
calling AcceptCurrentInstantPreview() when the user hits Tab leads to
InstantController::CommitIfPossible(INSTANT_COMMIT_PRESSED_ENTER), so Instant
wrongly thinks the user hit Enter and calls "Submit(query)" on the active tab.
The bug only occurs on non-Aura Windows, because in Aura, Tab doesn't cause
AcceptCurrentInstantPreview() to be called anyway. So, I've just removed this
call altogether, from GTK and Win too.
BUG=179974
R=pkasting@chromium.org
TEST=See bug.
Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=188281
Patch Set 1 #
Messages
Total messages: 4 (0 generated)
|