-
Notifications
You must be signed in to change notification settings - Fork 80
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: commit focused date on outside click #5670
fix: commit focused date on outside click #5670
Conversation
It seems that the reason the user input doesn't get committed on overlay close is because deselecting a date with Space doesn't reset web-components/packages/date-picker/src/vaadin-date-picker-mixin.js Lines 910 to 912 in 0e72706
|
Kudos, SonarCloud Quality Gate passed!
|
* fix: apply input value on outside click * fix: select focused date on outside click except input element click * fix: use default selection behaviour * fix: reset userConfirmedDate if a date is deselected * test: add deselect test * test: move test to dropdown tests * test: convert arrowdown to arrowright and change test date
Hi @ugur-vaadin , this commit cannot be picked to 23.3 by this bot, can you take a look and pick it manually? |
* fix: apply input value on outside click * fix: select focused date on outside click except input element click * fix: use default selection behaviour * fix: reset userConfirmedDate if a date is deselected * test: add deselect test * test: move test to dropdown tests * test: convert arrowdown to arrowright and change test date Co-authored-by: Ugur Saglam <106508695+ugur-vaadin@users.noreply.github.com>
Description
Currently, on selection via
Enter
key,Space
key, orToday
button, the selection happens instantaneously. A possible duplication of the selection and validation on overlay close is avoided by setting__userConfirmedDate
. WhenSpace
is used to deselect an already selected item, the absence of a__userConfirmedDate
is not properly communicated. This PR sets__userConfirmedDate
based on whether the event is a selection or a deselection.Fixes #5640
Type of change
Checklist