Index: chrome/browser/ui/cocoa/bookmarks/bookmark_editor_base_controller.mm |
diff --git a/chrome/browser/ui/cocoa/bookmarks/bookmark_editor_base_controller.mm b/chrome/browser/ui/cocoa/bookmarks/bookmark_editor_base_controller.mm |
index 31f4ecb658c97480797472d3a539ee3f71b0e51a..6e59a90ff28711ca1f3bc134a3d5b1a5248cbb97 100644 |
--- a/chrome/browser/ui/cocoa/bookmarks/bookmark_editor_base_controller.mm |
+++ b/chrome/browser/ui/cocoa/bookmarks/bookmark_editor_base_controller.mm |
@@ -239,6 +239,8 @@ class BookmarkEditorBaseControllerBridge : public BookmarkModelObserver { |
} |
- (IBAction)ok:(id)sender { |
+ NSWindow* window = [self window]; |
+ [window makeFirstResponder:window]; |
// At least one of these two functions should be provided by derived classes. |
BOOL hasWillCommit = [self respondsToSelector:@selector(willCommit)]; |
BOOL hasDidCommit = [self respondsToSelector:@selector(didCommit)]; |
@@ -257,7 +259,7 @@ class BookmarkEditorBaseControllerBridge : public BookmarkModelObserver { |
shouldContinue = [hasDidContinue boolValue]; |
} |
if (shouldContinue) |
- [NSApp endSheet:[self window]]; |
+ [NSApp endSheet:window]; |
} |
- (IBAction)cancel:(id)sender { |