-
Notifications
You must be signed in to change notification settings - Fork 176
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
Characters typed with the click shortcut key get cleared from input #18048
Comments
Using following instead would fix that:
It calls |
This ticket/PR has been released with Vaadin 24.3.0.alpha5 and is also targeting the upcoming stable 24.3.0 version. |
* feat: reset focus on active element in ShortcutRegistration Adds setResetFocusOnActiveElement, resetFocusOnActiveElement and isResetFocusOnActiveElement to ShortcutRegistration class to optionally reset focus on active element (focused element in browser). Resetting means calling blur() and focus() on the active element to ensure that input fields with ValueChangeMode ON_CHANGE will fire value change event before shortcut handler is run. Updates ClickNotifier#addClickShortcut(Key,KeyModifier...) to reset focus on active element by default for click shortcuts. Fixes: #5959 * test: fixed tests * chore: added null checking and text changes * chore: added window.Vaadin.Flow.resetFocus function * fix: revert addClickShortcut to not reset focus by default Removes a call `setResetFocusOnActiveElement(true)` in `addClickShortcut` method in `ClickNotifier` to revert default behavior changes from #17826. Fixes: #18048 * chore: update Reset focus on active element to work in 23 Adjusted reset focus script snippet from Flow 24 to work with 23. * chore: formatting --------- Co-authored-by: Mikhail Shabarov <61410877+mshabarov@users.noreply.github.com>
This ticket/PR has been released with Vaadin 23.4.0.alpha1 and is also targeting the upcoming stable 23.4.0 version. |
Description of the bug
There seems to be some click shortcut related regression.
With the following view:
(the outcome is the same with
NativeButton
andInput
)For some reason, every second character following a press of the click shortcut key gets cleared:
Kapture.2023-11-16.at.15.28.00.mp4
Related issue: #10362
Expected behavior
The characters should not get cleared from the input:
Kapture.2023-11-16.at.15.26.49.mp4
Minimal reproducible example
See description above
Versions
The text was updated successfully, but these errors were encountered: