Click when active to deactivate.
authorJoe Wreschnig <joe.wreschnig@gmail.com>
Sat, 9 Mar 2013 18:57:03 +0000 (19:57 +0100)
committerJoe Wreschnig <joe.wreschnig@gmail.com>
Sat, 9 Mar 2013 18:57:03 +0000 (19:57 +0100)
Classes/NJKeyInputField.m

index ec081505c13ce92a28b411617d7ac2c479d16aec..c9b2f4d1bf5b1fccaba366e06a108bf3ed0fee78 100644 (file)
@@ -193,7 +193,9 @@ CGKeyCode NJKeyInputFieldEmpty = 0xFFFF;
 }
 
 - (void)mouseDown:(NSEvent *)theEvent {
-    if (self.acceptsFirstResponder)
+    if (self.window.firstResponder == self)
+        [self.window makeFirstResponder:nil];
+    else if (self.acceptsFirstResponder)
         [self.window makeFirstResponder:self];
 }