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

Unified Diff: chrome/browser/ui/cocoa/bookmarks/bookmark_bubble_controller.mm

Issue 2950523003: [Mac] Fix for Dialog Textfields (Closed)
Patch Set: Created 3 years, 6 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
« no previous file with comments | « no previous file | chrome/browser/ui/cocoa/bookmarks/bookmark_editor_base_controller.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/cocoa/bookmarks/bookmark_bubble_controller.mm
diff --git a/chrome/browser/ui/cocoa/bookmarks/bookmark_bubble_controller.mm b/chrome/browser/ui/cocoa/bookmarks/bookmark_bubble_controller.mm
index c2e0a4fd52fe149e7b579e7e1cf728ec81f72cca..7be4bd6af27924163f8588968cbc08420513e5bf 100644
--- a/chrome/browser/ui/cocoa/bookmarks/bookmark_bubble_controller.mm
+++ b/chrome/browser/ui/cocoa/bookmarks/bookmark_bubble_controller.mm
@@ -150,6 +150,11 @@ NSString* const kDoneTouchBarId = @"DONE";
// We caught a close so we don't need to watch for the parent closing.
bookmarkObserver_.reset();
[self notifyBubbleClosed];
+
+ // Force the field editor to resign the first responder so that it'll
+ // be removed from the view hierarchy and its delegate be set to nil.
+ [[self window] endEditingFor:nameTextField_];
+
[super windowWillClose:notification];
}
@@ -267,7 +272,7 @@ NSString* const kDoneTouchBarId = @"DONE";
if (!textFieldEditor_)
textFieldEditor_.reset([[DialogTextFieldEditor alloc] init]);
- return textFieldEditor_.autorelease();
+ return textFieldEditor_.get();
}
// Shows the bookmark editor sheet for more advanced editing.
« no previous file with comments | « no previous file | chrome/browser/ui/cocoa/bookmarks/bookmark_editor_base_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698