grssam / UIEnhancer

Source code for UI Enhancer addon
https://addons.mozilla.org/en-US/firefox/addon/ui-enhancer/
50 stars 22 forks source link

feature request: Let users deselect location bar by hitting Escape key #136

Open audreytoskin opened 9 years ago

audreytoskin commented 9 years ago

Right now, when you are editing the URL bar and then you hit the Escape key, it only cancels your edits. At least this is how it works for me, with Location Bar Enhancer 5.2 on Firefox Developer Edition 40.0.

I think it would be nice if when you hit the Escape key, it deselected the location bar completely.

tumpio commented 8 years ago

I think it would be nice if when you hit the Escape key, it deselected the location bar completely.

It works this way for me, on Firefox 42.0

audreytoskin commented 8 years ago

Really? Perhaps I'm being unclear? Or maybe I'm the only one having this problem.

Testing Location Bar Enhancer 5.2.1 with the Devtools Light theme, on Firefox 42.0 with a dark browser theme, on Fedora (Linux) 64-bit with the GNOME 3 desktop.

Here's what the URL bar looks like when I first load a page. screenshot from 2015-11-13 15-59-12

Here it is when I click and edit the URL bar, typing randomly at the end. screenshot from 2015-11-13 16-00-21

And here, I hit the Escape key. It cancels my edits to the URL bar, but does not deselect the url. The Location Bar Enhancer's enhancement does not look and work again like it did in the first screenshot, until I click somewhere in the web page. screenshot from 2015-11-13 16-00-33

tumpio commented 8 years ago

hmm, I see. I think I have some other addon that implements it. Likely VimFx.

How does your escape key work on other input fields, does it deselect them?

Yup, VimFx adds that behaviour. I thought it was the default behaviour for escape key to deselect input fields, not to select all the text...

audreytoskin commented 8 years ago

Selecting the text when I hit escape only happens in the URL bar; for normal text input fields, hitting Escape might close any drop-down auto-suggestions, but it doesn't remove focus from the input field. This is the behavior in Google Chrome too. When you first click in the URL bar, it normally selects the whole URL, and you have to click again if you want to just edit part of the address. So I think the idea is that when you hit Escape, it allows you to change your mind and go somewhere else entirely after all.

So I guess the current Escape key behavior in Location Bar Enhancer fits the usual behavior for the browser. I still think hitting Escape to completely deselect the URL bar and reactivate the extension's enhancements could be a good thing -- but perhaps you would hit Escape a second time to do this.

tumpio commented 8 years ago

It is also possible to deselect using Tab-key or F6, while keeping the Escape key behaviour.

audreytoskin commented 8 years ago

Ah! It does. Tab is not the key I would have guessed, but it works.