Index: chrome/browser/autocomplete/autocomplete_edit.cc |
diff --git a/chrome/browser/autocomplete/autocomplete_edit.cc b/chrome/browser/autocomplete/autocomplete_edit.cc |
index 62b9564c2be4aee2d53edeff28a49c17a3dbe617..c0d158b98cc9c9ae1758c8bd96f8a0b698f33886 100644 |
--- a/chrome/browser/autocomplete/autocomplete_edit.cc |
+++ b/chrome/browser/autocomplete/autocomplete_edit.cc |
@@ -429,14 +429,18 @@ void AutocompleteEditModel::OpenURL(const GURL& url, |
// search engine, if applicable; see comments in template_url.h. |
} |
- controller_->OnAutocompleteWillAccept(); |
- |
- if (disposition != NEW_BACKGROUND_TAB) |
+ if (disposition != NEW_BACKGROUND_TAB) { |
+ controller_->OnAutocompleteWillAccept(); |
view_->RevertAll(); // Revert the box to its unedited state |
+ } |
controller_->OnAutocompleteAccept(url, disposition, transition, |
alternate_nav_url); |
} |
+bool AutocompleteEditModel::IsPopupOpen() const { |
+ return popup_->IsOpen(); |
+} |
+ |
void AutocompleteEditModel::AcceptKeyword() { |
view_->OnBeforePossibleChange(); |
view_->SetWindowTextAndCaretPos(std::wstring(), 0); |