Index: chrome/browser/ui/cocoa/autofill/autofill_dialog_window_controller.mm |
diff --git a/chrome/browser/ui/cocoa/autofill/autofill_dialog_window_controller.mm b/chrome/browser/ui/cocoa/autofill/autofill_dialog_window_controller.mm |
index c7ab45689916b9c13dcc4bc6452f4e911bf24b3f..4bcd543c693be75a34166f8985ff473736c8b024 100644 |
--- a/chrome/browser/ui/cocoa/autofill/autofill_dialog_window_controller.mm |
+++ b/chrome/browser/ui/cocoa/autofill/autofill_dialog_window_controller.mm |
@@ -56,6 +56,18 @@ const CGFloat kDecorationHeight = kAccountChooserHeight + |
[super mouseDown:event]; |
} |
+// Intercept key down messages and forward them to the text fields delegate. |
+// This needs to happen in the field editor, since it handles all keyDown |
+// messages for NSTextField. |
+- (void)keyDown:(NSEvent*)event { |
+ AutofillTextField* textfield = |
+ base::mac::ObjCCastStrict<AutofillTextField>([self delegate]); |
+ if ([[textfield inputDelegate] keyEvent:event |
+ forInput:textfield] != kKeyEventHandled) { |
+ [super keyDown:event]; |
+ } |
+} |
+ |
@end |