-
Notifications
You must be signed in to change notification settings - Fork 83
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
fix!: align how clear button works with combo box behavior #6100
Conversation
Make the behavior of clicking the clear button to be align with how `vaadin-combo-box` works. This change: - adds a touchstart listener that prevenst default, clears the input element, BUT does not focus it - adds a mousedown listener that prevents default, focuses the input element, AND clears it - keep a click listener that does the same mousedown behavior, mostly used for programmatically clicks on the button
Co-authored-by: Sergey Vinogradov <[email protected]>
Co-authored-by: Sergey Vinogradov <[email protected]>
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.
I manually tested text-field, date-picker, time-picker, combo-box on iOS and their clear button functionality now works consistently.
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
Hi @DiegoCardoso , this commit cannot be picked to 24.0 by this bot, can you take a look and pick it manually? |
Hi @DiegoCardoso , this commit cannot be picked to 23.3 by this bot, can you take a look and pick it manually? |
…6122) Co-authored-by: Diego Cardoso <[email protected]>
This ticket/PR has been released with Vaadin 24.2.0.alpha3 and is also targeting the upcoming stable 24.2.0 version. |
Description
Make the behavior of clicking the clear button to be aligned with how
<vaadin-combo-box>
works.This change:
touchstart
listener that prevent default, and clears the input element, BUT does not focus itmousedown
listener that prevents default, focuses the input element, AND clears itmousedown
behavior, mostly used for programmatic clicks on the buttonThese changes also fix the issue described in vaadin/flow-components#5137, since it prevents the
focusout
event and the editor won't close after clicking the clear button.Fixes #4130
Part of vaadin/flow-components#5137
Type of change