-
Notifications
You must be signed in to change notification settings - Fork 66
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
Focus listener on DateTimePicker is not working #2284
Comments
Thanks for the issue. It could be related to #1156 although the problem there is different. |
Thanks for pointing out to the issue. Here the problem is that the focus event is not called, I think that the listener should be defined on one of the internal components (DatePicker or TimePicker) To fix this I have two ideas:
What do you think? |
To me it sounds like enhancement issue. I'm not sure about the implementation, the team will need to discuss how to address this. |
For reference Focusable was added in vaadin/vaadin-date-time-picker-flow#5 |
Confirmed, foes not work in Vaadin 22. Also Blur event is broken. |
The default implementation does not work, as there are two elements, which individually can have focus. So the most likely the the best way is to make them both delegate the focus / blur events. I ended up doing this approach in my ColorPicker component, which is similar as it has Thus I am internally in the web component listening to blur and focus events and passing them to server, so that the default implementation still works. https://github.com/TatuLund/ColorPicker/blob/master/src/main/resources/META-INF/resources/frontend/color-picker.ts |
If anyone is looking for workaround:
|
Description
A focus listener defined on DateTimePicker is not triggered when focusing on date/time pickers.
Example
A very basic example in Kotlin:
Environment
Browsers Affected
The text was updated successfully, but these errors were encountered: