Skip to content
Snippets Groups Projects
Commit 79a086c6 authored by George Nachman's avatar George Nachman
Browse files

Fix a crash when you open the color popover, close the color popover, and...

Fix a crash when you open the color popover, close the color popover, and switch to another app. See comment for details.
parent b563ba98
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -146,6 +146,16 @@ static NSString * const kColorGalleryURL = @"https://www.iterm2.com/colorgallery
colorWell.action = @selector(settingChanged:);
colorWell.target = self;
colorWell.continuous = YES;
colorWell.willClosePopover = ^() {
// NSSearchField remembers who was first responder before it gained
// first responder status. That is the popover at this time. When
// the app becomes inactive, the search field makes the previous
// first responder the new first responder. The search field is not
// smart and doesn't realize the popover has been deallocated. So
// this changes its conception of who was the previous first
// responder and prevents the crash.
[self.view.window makeFirstResponder:nil];
};
}
 
PreferenceInfo *info;
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment