Input clearing UX on escape #960
andreyvolokitin
started this conversation in
Ideas
Replies: 1 comment 3 replies
-
This is interesting, but what I'd like to question whether the heuristic for escape being used for clearing the query. For me the query clearing is more of a side effect from closing the modal, which is the main goal of pressing escape. You can see analogies in native desktop applications. Escape either closes a modal/dropdown (with or without clearing an input), but will never only clear the input without also closing the modal. Could I ask where you see people use escape to clear the query? |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Pressing an "escape" key closes the autocomplete, second keypress clears the input as shown in a demo. This is logical because it allows hiding autocomplete immediately, considering this is the thing the user wants (though not always, I stumbled upon a use-case when I'd want to first clear the input, i.e. if I want to search for another term ASAP, but currently for this I'd need to press "escape" twice).
In detached mode we have a modal and pressing "escape" closes it immediately. I thought that maybe this can cause problems. If the user wants to clear the input to search for another term, they would be required to re-trigger a modal by point-and-click a trigger button again, only then it will be possible to type a new search term.
Again, depending on what the user expects, this could be ok, but I personally considered it an issue, because there basically no "clear-on-escape" functionality in detached mode, there's just "close-on-escape", and then if you want to search a different term — you need to point-and-click again. This makes searching different terms less convenient, i.e. you need to use a mouse together with a keyboard to re-trigger a modal (as compared to only using a keyboard in regular mode, OR if the input would've been cleared on the first "escape" press, with a modal close on a 2nd press).
Maybe an option could be introduced for detached mode (or for all modes), i.e.
prioritizeEscapeClearing
ordoubleEscapeClose
, orpersistPanelOnFirstEscape
, which will allow input clearing on first "escape" press, and panel/modal closing on 2nd "escape" press?Beta Was this translation helpful? Give feedback.
All reactions