Focus issue with project search


#1

Atom 0.139.0 on OSX Yosemite. I think it happened with Mavericks, too, and with previous versions of Atom.

Atom is not running. I do atom --safe . in some directory which has a .git subdirectory. I do cmd-shift-F to invoke “Find in project”. I enter a search string with at least one match. The search begins. The search ends, the first match is highlighted. I hit Return (Enter) to open it. Nothing happens. I hit Esc to dismiss the panel that allows me to enter the search term. I again hit Return (Enter) to open the search result. Nothing happens.

I hit ctrl-0 to go to the project tree panel thing. I use ctrl-n to navigate to some file. I use Return/Enter to open that file.

I use ctrl-tab to switch back to the Search Results tab. I hit Enter/Return (same key as before). The search result opens!

Actually, it doesn’t matter whether I open a new tab after ctrl-shift-F. Just switching to another tab and then back is enough to allow the Search Results pane to receive focus properly.

It is not enough to switch to another program using cmd-Tab and back again. (I just tried with the other program being Safari.)

I hope this is a useful bug report.


#2

When you press RETURN after entering the search term, the search panel still has focus. You can see this by hitting TAB multiple times until the cursor shows up again. If you feel the right behavior is to give focus to the search results panel, please file an Issue on the find-and-replace package and link it back here.


#3

Thanks, @leedohm, I see it now: after hitting tab, the cursor ends up in the search field again. But surely after the Esc key, the search results panel should have the focus. Makes no sense to retain focus in a panel that has just been hidden…


#4

I’ve now submitted this ticket: