From 921fcbdcd021f1ec1e8e1f869ce47b2e7585bd77 Mon Sep 17 00:00:00 2001 From: Alexandre Wilhelm Date: Mon, 29 Sep 2014 19:19:17 -0700 Subject: [PATCH] Fixed: firstResponder is lost when adding a firstResponder view to the same window Previously, when adding a view (which is the firstResponder of the window) to the same window, the firstResponder was set to nil. Now it keeps the same firstResponder. --- AppKit/CPView.j | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/AppKit/CPView.j b/AppKit/CPView.j index 9de2e67bc..1a600667c 100644 --- a/AppKit/CPView.j +++ b/AppKit/CPView.j @@ -751,7 +751,7 @@ var CPViewFlags = { }, [[self window] _dirtyKeyViewLoop]; // Clear out first responder if we're the first responder and leaving. - if ([_window firstResponder] === self) + if ([_window firstResponder] === self && _window != aWindow) [_window makeFirstResponder:nil]; // Notify the view and its subviews