git-up / GitUp

The Git interface you've been missing all your life has finally arrived.
http://gitup.co
GNU General Public License v3.0
11.44k stars 1.23k forks source link

Search field delete/backspace should not carry through to deleting commits #991

Open matthewhively opened 2 months ago

matthewhively commented 2 months ago

When I'm typing in the search field, and want to delete everything I've typed there and start a new search, I usually am lazy and press and hold down delete key. Currently, when the search field runs out of characters it automatically closes and transfers focus back to the main GitUp window. Which, if I'm holding down delete still, will then attempt to delete the HEAD commit of my current branch. Thankfully there is a confirmation box for that, but I would wager the delete commit action is NEVER what any dev would want to happen in that scenario.

Essentially this comes down to a focus issue, the search box probably should not instantly & automatically close thereby transferring active context back to the main window when the user is still using the keyboard. If the user clicks the X button within the search field that makes sense to completely clear and close out the search sidebar, but not any sort of keyboard entry. My cursor should remain within the search field unless I move out of it (tab key or a click of some kind)

lucasderraugh commented 2 months ago

I agree. Only the x, clicking elsewhere (changing focus, includes tab), or the escape key should probably get you out of that flow.