Open trusktr opened 5 years ago
Ah, think I found what causes it: when the window loses focus!
When it works: If I open the terminal while I am in a text editor, then close the terminal, the editor gains focus again as expected.
When it doesn't work: If I open the terminal while I am in a text editor, then switch to another window (another app, or even just another Atom window), then return, then close the terminal, the editor does not gain focus after closing the terminal. At this point, nothing seems to be focused, or at least I don't know what's focused. Then I click on the editor to continue.
I'm in macOS Mojave.
I can confirm exactly the same thing with the file explorer. For example, without switching windows, if I start in the file explorer, open terminal then close terminal, I end up back in the file explorer. But if I switch windows then come back before closing the terminal, then focus goes nowhere (or somewhere but I've no idea where).
One way I can work around this is to just always close the terminal when I'm done with it. That way any time I need it, I open it, use it, close it. Then I return to where I was focused. At this point switching windows will not lose the focus.
Hi @trusktr Sorry about that. I'll see if I can figure out what's going on. :smile:
I noticed another way to trigger it: using only keyboard shortcuts (haven't tested with mouse) do the following: toggle terminal open, switch to next or previous terminal, toggle terminal closed. Then notice the panel you return to has no focus. The focus seems to have gone into oblivion until we click somewhere with the mouse.
Sometime the text editor does gain focus again, but I'm not sure what I did in the cases when it doesn't.
So I end up having to go the touchpad or mouse and then click on the editor to use it.
It'd be nice if maybe there was an option to force
termination:toggle
command to always focus the current tab's editor (or if there's multiple panes, maybe the last used tab?).