summaryrefslogtreecommitdiffstats
path: root/chrome/browser/cocoa/autocomplete_text_field.mm
diff options
context:
space:
mode:
authorviettrungluu@chromium.org <viettrungluu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-12-20 07:17:14 +0000
committerviettrungluu@chromium.org <viettrungluu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-12-20 07:17:14 +0000
commit36fcda6c03115d0247178adf2513babc12eaf195 (patch)
tree5d811833b42ce1e1a80e95f482255ca78f15dba2 /chrome/browser/cocoa/autocomplete_text_field.mm
parent52d2d0c3f6643db7e9b8a3355be65f457d3dc947 (diff)
downloadchromium_src-36fcda6c03115d0247178adf2513babc12eaf195.zip
chromium_src-36fcda6c03115d0247178adf2513babc12eaf195.tar.gz
chromium_src-36fcda6c03115d0247178adf2513babc12eaf195.tar.bz2
Revert 35062 - Mac: Third half of CL 481012 (reverted at r35038). Will it blend?
This is an experiment. I expect the startup times to regress and Mac Perf(2) to turn red, at which point I'll revert this. If not, the TEST below applies. [Yes, indeed, it turned red. Crazy!] BUG=24631 TEST=Select a URL/link/file from somewhere (a link in a browser, a URL in text, a file from the desktop, etc.) and drag it to the Omnibox in a Chromium browser window; the contents of the Omnibox should be selected to indicate that a drop would replace its contents; dropping should navigate to the appropriate location. Review URL: http://codereview.chromium.org/500155 TBR=viettrungluu@chromium.org, shess@chromium.org Review URL: http://codereview.chromium.org/502086 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@35063 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/cocoa/autocomplete_text_field.mm')
-rw-r--r--chrome/browser/cocoa/autocomplete_text_field.mm5
1 files changed, 5 insertions, 0 deletions
diff --git a/chrome/browser/cocoa/autocomplete_text_field.mm b/chrome/browser/cocoa/autocomplete_text_field.mm
index c465ef1..cea5f15 100644
--- a/chrome/browser/cocoa/autocomplete_text_field.mm
+++ b/chrome/browser/cocoa/autocomplete_text_field.mm
@@ -265,6 +265,11 @@
// (URLDropTarget protocol)
- (NSDragOperation)draggingEntered:(id<NSDraggingInfo>)sender {
+ // Make ourself the first responder, which will select the text to indicate
+ // that our contents would be replaced by a drop.
+ // TODO(viettrungluu): crbug.com/30809 -- this is a hack since it steals focus
+ // and doesn't return it.
+ [[self window] makeFirstResponder:self];
return [dropHandler_ draggingEntered:sender];
}