New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make text fields yield keyboard focus on "Esc" in a consistent way #19484
Conversation
On macOS at least its a standard UI convention to be able to use Esc to clear search fields. I'm not necessarily opposed to removing this, but i wonder if we should think about adding some other quick mechanism to clear search fields? macOS also adds a floating ❎ right aligned inside the field once there is text. |
I don't mind changing the behavior (Esc clears, then yields if empty) as long as it's consistent across fields. |
That sounds best to me (for search fields only). We could add a search glyph in the left of the field if we want to visually distinguish them from other types of text field. |
What about the chat input then? It's not a search field and I want to standardize its behavior too. |
a015714
to
9617180
Compare
Made some amendments as discussed:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM otherwise
- search fields clear the input and yield if empty - chat field and actor edit field yield without clearing
9617180
to
c1abbc6
Compare
Update: Addressed review comments. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok.
Some text fields were clearing the input on Esc before yielding focus and others were only clearing input (lobby chat field) and others were doing both at the same time (map editor search filter). This PR standardizes this behavior to just yielding focus without clearing the input. There are some special case text fields that I have not touched (player name, map chooser, in-game chat). In the future we may set this behavior as the default for text inputs so that chrome logic doesn't need to implement it.
Closes #15426