aboutsummaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorMax Lohrmann <dmoagx@users.noreply.github.com>2016-04-17 20:52:07 +0200
committerMax Lohrmann <dmoagx@users.noreply.github.com>2016-04-17 20:52:07 +0200
commit2b638f817e992a23192940693e9358ac9f57c82b (patch)
treeb6385f3f373df5168152916553841c90ff644244 /Source
parentd8ee2f96227b1e35163fa19a62cbd17279aadc17 (diff)
downloadsequelpro-2b638f817e992a23192940693e9358ac9f57c82b.tar.gz
sequelpro-2b638f817e992a23192940693e9358ac9f57c82b.tar.bz2
sequelpro-2b638f817e992a23192940693e9358ac9f57c82b.zip
Fix a focus loss issue from the previous commit (#2468)
Diffstat (limited to 'Source')
-rw-r--r--Source/SPTableContent.m5
1 files changed, 5 insertions, 0 deletions
diff --git a/Source/SPTableContent.m b/Source/SPTableContent.m
index 1ed74576..88d5d2ea 100644
--- a/Source/SPTableContent.m
+++ b/Source/SPTableContent.m
@@ -703,6 +703,11 @@ static NSString *SPTableFilterSetDefaultOperator = @"SPTableFilterSetDefaultOper
// Store the current first responder so filter field doesn't steal focus
id currentFirstResponder = [[tableDocumentInstance parentWindow] firstResponder];
+ // For text inputs the window's fieldEditor will be the actual firstResponder, but that is useless for setting.
+ // We need the visible view object, which is the delegate of the field editor.
+ if([currentFirstResponder respondsToSelector:@selector(isFieldEditor)] && [currentFirstResponder isFieldEditor]) {
+ currentFirstResponder = [currentFirstResponder delegate];
+ }
// Enable and initialize filter fields (with tags for position of menu item and field position)
[fieldField setEnabled:YES];