| Index: chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.mm
|
| diff --git a/chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.mm b/chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.mm
|
| index 72f3172da472d70a52e24f4ad3e26d70cc06a528..436963d6ad584fcc397db2a6c41badbf1b630022 100644
|
| --- a/chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.mm
|
| +++ b/chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.mm
|
| @@ -233,18 +233,17 @@ void LocationBarViewMac::OnAutocompleteLosingFocus(gfx::NativeView unused) {
|
| if (!instant)
|
| return;
|
|
|
| - if (!instant->is_active() || !instant->GetPreviewContents())
|
| - return;
|
| -
|
| // If |IsMouseDownFromActivate()| returns false, the RenderWidgetHostView did
|
| // not receive a mouseDown event. Therefore, we should destroy the preview.
|
| // Otherwise, the RWHV was clicked, so we commit the preview.
|
| - if (!instant->IsMouseDownFromActivate())
|
| + if (!instant->is_displayable() || !instant->GetPreviewContents() ||
|
| + !instant->IsMouseDownFromActivate()) {
|
| instant->DestroyPreviewContents();
|
| - else if (instant->IsShowingInstant())
|
| + } else if (instant->IsShowingInstant()) {
|
| instant->SetCommitOnMouseUp();
|
| - else
|
| + } else {
|
| instant->CommitCurrentPreview(INSTANT_COMMIT_FOCUS_LOST);
|
| + }
|
| }
|
|
|
| void LocationBarViewMac::OnAutocompleteWillAccept() {
|
|
|