Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(234)

Unified Diff: chrome/browser/autocomplete/autocomplete_edit.cc

Issue 6028010: Fixes bug in handling of openning background tabs by way of clicking (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 12 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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);

Powered by Google App Engine
This is Rietveld 408576698