summaryrefslogtreecommitdiffstats
path: root/chrome/browser/autocomplete/autocomplete_popup_model.cc
diff options
context:
space:
mode:
authorpkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-02-01 19:31:30 +0000
committerpkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-02-01 19:31:30 +0000
commit4ab8cebe271e942522ddf739102e6211c1325565 (patch)
treece22f1c57eabc1231d77b4b1a513634f19dd4e89 /chrome/browser/autocomplete/autocomplete_popup_model.cc
parentc9d7c211e90e2f811a03d25542afb4302c47525e (diff)
downloadchromium_src-4ab8cebe271e942522ddf739102e6211c1325565.zip
chromium_src-4ab8cebe271e942522ddf739102e6211c1325565.tar.gz
chromium_src-4ab8cebe271e942522ddf739102e6211c1325565.tar.bz2
Make pressing <esc> while dragging in the omnibox correctly cancel dragging. Original patch by Philippe Beaudoin (see http://codereview.chromium.org/554143 ), r=me, tweaked.
BUG=33460 TEST=Write goog in the omnibox, drag around, while pressing the left mouse button hit ESC. The selection should return to the first entry and not move as you continue to drag. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@37724 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/autocomplete/autocomplete_popup_model.cc')
-rw-r--r--chrome/browser/autocomplete/autocomplete_popup_model.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/chrome/browser/autocomplete/autocomplete_popup_model.cc b/chrome/browser/autocomplete/autocomplete_popup_model.cc
index 8b0c9d1..eeca0d2 100644
--- a/chrome/browser/autocomplete/autocomplete_popup_model.cc
+++ b/chrome/browser/autocomplete/autocomplete_popup_model.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
+// Copyright (c) 2010 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -145,6 +145,7 @@ void AutocompletePopupModel::ResetToDefaultMatch() {
const AutocompleteResult& result = controller_->result();
CHECK(!result.empty());
SetSelectedLine(result.default_match() - result.begin(), true);
+ view_->OnDragCanceled();
}
GURL AutocompletePopupModel::URLsForCurrentSelection(