Switching to code search via keyboard shortcuts has unexpected behavior

Problem description:
On my Mac, cmd+shift+f opens up a code search tab and focuses on the search text box. However, if you already have a code search tab open and it’s not the active tab, then cmd+shift+f re-opens the code search tab but doesn’t focus on the search input box.

Expected behavior:
cmd+shift+f for code search should always behave in the same way, ideally it should always focus on the search input field so I can start typing immediately

Actual behavior:
cmd+shift+f focuses on the input field if there is no existing code search tab, but doesn’t if there is one. The result is that I often hit cmd+shift+f and start typing a query, realise it wasn’t focused, and focus on the search box, but have also inadvertently injected random letters into my codebase in whatever file I was previously on, and then have to hunt to correct the error

Steps to reproduce:
Open up a code search tab and then open up any other tab. Hit cmd+shift+f. The code search tab appears again, but the input isn’t focused on.

M1 MacBook / safari

It appears as though this issue has been fixed.

Can you try again and let me know if it’s still happening?

Hey :slight_smile: nope - still happens for me, just tested

Do you have any browser extensions installed? When you uninstall/disable them temporarily, does the issue still occur?

Just plain old un-modded safari

Can you send me a screen recording with loom.com so I can confirm this unexpected behavior?

Sorry, afraid I don’t have the time for that, I described what happens & that’s all the video would show anyway :slight_smile: Note that the code search has to be both already open and a different tab in that pane has to be focused on.

After some digging, I was able to reproduce the issue on Safari. Thanks for the report, passing it along to the team.

1 Like