Skip to content

Commit

Permalink
Only force resign field editor as a last resort
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex Zielenski committed Apr 12, 2012
1 parent 59bce74 commit a369f5c
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/ZKTextField.m
Expand Up @@ -408,6 +408,8 @@ - (void)endEditing
if (self._currentFieldEditor) {
self.attributedString = self._currentFieldEditor.attributedString;

[self.window endEditingFor:self];

[self._currentClipView removeFromSuperview];
self._currentClipView = nil;
self._currentFieldEditor = nil;
Expand Down Expand Up @@ -441,8 +443,8 @@ - (void)mouseDown:(NSEvent *)event

- (void)_configureFieldEditor
{

[self.window endEditingFor:nil]; // Free the field editor
if (![self.window makeFirstResponder:self.window])
[self.window endEditingFor:nil]; // Free the field editor

NSTextView *fieldEditor = (NSTextView *)[self.window fieldEditor:YES
forObject:self];
Expand Down

0 comments on commit a369f5c

Please sign in to comment.