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 18eca7160ecee6c7c6e9ba1c34f33cdc79158acd..f53a2e42d09dca9af8a3e53c69884401955b3de4 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 |