Index: chrome/browser/ui/views/omnibox/omnibox_view_views.cc |
diff --git a/chrome/browser/ui/views/omnibox/omnibox_view_views.cc b/chrome/browser/ui/views/omnibox/omnibox_view_views.cc |
index 3bcdeba9133953114688235afb2c112c84aa6511..2d7a8a06a551701e5d9b5efdcab656888a0115ea 100644 |
--- a/chrome/browser/ui/views/omnibox/omnibox_view_views.cc |
+++ b/chrome/browser/ui/views/omnibox/omnibox_view_views.cc |
@@ -817,6 +817,8 @@ bool OmniboxViewViews::SkipDefaultKeyEventProcessing( |
model()->popup_model()->IsOpen())) { |
return true; |
} |
+ if (event.key_code() == ui::VKEY_ESCAPE) |
+ return model()->WillHandleEscapeKey(); |
return Textfield::SkipDefaultKeyEventProcessing(event); |
} |
@@ -859,7 +861,16 @@ void OmniboxViewViews::OnBlur() { |
views::Textfield::OnBlur(); |
model()->OnWillKillFocus(); |
- CloseOmniboxPopup(); |
+ |
+ // If zerosuggest is active, we may have refused to show an update to the |
+ // underlying permanent URL that happened while the popup was open, so |
+ // revert to ensure that update is shown now. Otherwise, make sure to call |
+ // CloseOmniboxPopup() unconditionally, so that if zerosuggest is in the midst |
+ // of running but hasn't yet opened the popup, it will be halted. |
+ if (!model()->user_input_in_progress() && model()->popup_model()->IsOpen()) |
+ RevertAll(); |
+ else |
+ CloseOmniboxPopup(); |
// Tell the model to reset itself. |
model()->OnKillFocus(); |