| Index: chrome/browser/ui/omnibox/omnibox_edit_model.cc
|
| diff --git a/chrome/browser/ui/omnibox/omnibox_edit_model.cc b/chrome/browser/ui/omnibox/omnibox_edit_model.cc
|
| index 4ee0baf09bcd9a3ca909c61bd67523d2afd9959f..e983bbca3432bc094ee0c36f77df900e704d8288 100644
|
| --- a/chrome/browser/ui/omnibox/omnibox_edit_model.cc
|
| +++ b/chrome/browser/ui/omnibox/omnibox_edit_model.cc
|
| @@ -1032,10 +1032,15 @@ bool OmniboxEditModel::OnAfterPossibleChange(const string16& old_text,
|
|
|
| if (text_differs || selection_differs) {
|
| // Record current focus state for this input if we haven't already.
|
| - DCHECK_NE(OMNIBOX_FOCUS_NONE, focus_state_);
|
| if (focus_source_ == INVALID) {
|
| - focus_source_ = (focus_state_ == OMNIBOX_FOCUS_VISIBLE) ?
|
| - OMNIBOX : FAKEBOX;
|
| + // We should generally expect the omnibox to have focus at this point, but
|
| + // it doesn't always on Linux. This is because, unlike other platforms,
|
| + // right clicking in the omnibox on Linux doesn't focus it. So pasting via
|
| + // right-click can change the contents without focusing the omnibox.
|
| + // TODO(samarth): fix Linux focus behavior and add a DCHECK here to
|
| + // check that the omnibox does have focus.
|
| + focus_source_ = (focus_state_ == OMNIBOX_FOCUS_INVISIBLE) ?
|
| + FAKEBOX : OMNIBOX;
|
| }
|
|
|
| // Restore caret visibility whenever the user changes text or selection in
|
|
|