Repository navigation
Conversation
|
Seems like we would like to keep the same behavior when there is a focused window, but fix when there is no focused window. Is that what happens here? |
The current behavior is kept when there is a focused window and the semantics for opening a new window without a focused window are applied otherwise. |
|
FYI: this is probably related to #7428, so update accordingly if it addresses. |
|
That is the same issue. |
There was a problem hiding this comment.
I don't understand how this would fix anything. If there is no focused window, both evaluate to exactly the same thing, so how does this fix anything if that's exactly the case we want to change the behavior of?
There was a problem hiding this comment.
I have the same question. Assuming that the focusedWindow() works properly, this should not change the behavior in the case where there isn't a focused window. Am I missing something @fb55?
There was a problem hiding this comment.
Late response: On OSX, it is possible that there is no focused window (eg. when all windows are closed), but the application might still be active and receive keyboard events. Native applications still allow users to open new files via keyboard shortcuts, which isn't supported by Atom.
If there is no focused window, then focusedWindow returns undefined and the command is ignored. Removing this check seemed like a quick fix. Having a second look, the newWindow option of openPath should instead probably be set to Boolean(@focusedWindow()).
Any thoughts?
There was a problem hiding this comment.
If there is no focused window, then focusedWindow returns undefined and the command is ignored. Removing this check seemed like a quick fix.
I don't think your fix will have the desired effect. With the original code, if @focusedWindow() returned undefined, then this.openPath() would be called. Your change makes it so that this.openPath() is always called, even if there is a focused window.
|
#10233 fixed that bug 💥 |
Fixes #7171
OSX allows applications to be in focus without an active window, which leads to some unexpected behavior.