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

Unified Diff: chrome/browser/autocomplete/autocomplete_edit_view_mac.mm

Issue 149622: Backing out r20493 (http://codereview.chromium.org/149492), as it inadvertent... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 5 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
« no previous file with comments | « chrome/browser/autocomplete/autocomplete_edit_view_mac.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/autocomplete/autocomplete_edit_view_mac.mm
===================================================================
--- chrome/browser/autocomplete/autocomplete_edit_view_mac.mm (revision 20621)
+++ chrome/browser/autocomplete/autocomplete_edit_view_mac.mm (working copy)
@@ -549,8 +549,13 @@
}
void AutocompleteEditViewMac::FocusLocation() {
- [[field_ window] makeFirstResponder:field_];
- DCHECK_EQ([field_ currentEditor], [[field_ window] firstResponder]);
+ // -makeFirstResponder: will select the entire field_. If we're
+ // already firstResponder, it's likely that we want to retain the
+ // current selection.
+ if (![field_ currentEditor]) {
+ [[field_ window] makeFirstResponder:field_];
+ DCHECK_EQ([field_ currentEditor], [[field_ window] firstResponder]);
+ }
}
@implementation AutocompleteFieldDelegate
« no previous file with comments | « chrome/browser/autocomplete/autocomplete_edit_view_mac.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698