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

Unified Diff: chrome/browser/ui/cocoa/location_bar/autocomplete_text_field.mm

Issue 23526044: Disable click to select all for search terms (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 3 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/ui/cocoa/location_bar/autocomplete_text_field.mm
diff --git a/chrome/browser/ui/cocoa/location_bar/autocomplete_text_field.mm b/chrome/browser/ui/cocoa/location_bar/autocomplete_text_field.mm
index ee2dc0f032fe292ceee58001ec34bfc001625626..5150d6e47908d40f3030ab0c45525f816a149789 100644
--- a/chrome/browser/ui/cocoa/location_bar/autocomplete_text_field.mm
+++ b/chrome/browser/ui/cocoa/location_bar/autocomplete_text_field.mm
@@ -128,7 +128,8 @@
if (editor) {
NSEvent* currentEvent = [NSApp currentEvent];
if ([currentEvent type] == NSLeftMouseUp &&
- ![editor selectedRange].length) {
+ ![editor selectedRange].length &&
+ (!observer_ || observer_->ShouldSelectAllOnMouseDown())) {
[editor selectAll:nil];
}
}

Powered by Google App Engine
This is Rietveld 408576698