summaryrefslogtreecommitdiffstats
path: root/chrome/browser/autocomplete
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser/autocomplete')
-rw-r--r--chrome/browser/autocomplete/autocomplete_edit_view_mac.mm9
1 files changed, 9 insertions, 0 deletions
diff --git a/chrome/browser/autocomplete/autocomplete_edit_view_mac.mm b/chrome/browser/autocomplete/autocomplete_edit_view_mac.mm
index 798a534..a8a15c7 100644
--- a/chrome/browser/autocomplete/autocomplete_edit_view_mac.mm
+++ b/chrome/browser/autocomplete/autocomplete_edit_view_mac.mm
@@ -871,6 +871,15 @@ std::wstring AutocompleteEditViewMac::GetClipboardText(Clipboard* clipboard) {
}
- (void)controlTextDidBeginEditing:(NSNotification*)aNotification {
+ // After the user runs the Print or Page Layout panels, this
+ // notification starts coming at inappropriate times. Ignore the
+ // notification when the field does not have a field editor. See
+ // http://crbug.com/19116 for additional info.
+ NSTextField* field = static_cast<NSTextField*>([aNotification object]);
+ if ([field isKindOfClass:[NSTextField class]] && ![field currentEditor]) {
+ return;
+ }
+
edit_view_->OnWillBeginEditing();
}