-
Notifications
You must be signed in to change notification settings - Fork 62
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
Inconsistent focus behaviour of nested helper components #955
Inconsistent focus behaviour of nested helper components #955
Comments
I've got the same issue, if you click on the helper slot then the component is clicked.
|
The scenario depicted is not considered an intended use case for the helper feature. The helper feature, as the name implies, is meant for providing instructions or other simple (primarily non-interactive) elements such as password strength indicators -- it is not a generic layout mechanism for grouping multiple fields or other interactive elements together. Still, it might be useful to keep focus on the helper in some intended use cases also, so we will look into adding that in a later version. |
What’s the “enhancement” we are looking for here? The use case I can think of is an “additional help” link or icon+tooltip. The current behavior is a bit strange. I don’t think clicking the helper should do anything special, as it now moves the focus to the field. I might classify this more like a bug than an enhancement. |
That's a good point -- should clicking the helper focus the input field? I don't see why it should (in contrast to the label, which I think makes sense). |
Ok, recategorizing this as a bug, in that the current focus behavior makes any interactive content in the helper weird (although not necessarily unusable), and I don't see why that behavior would be desired even if we don't specifically intend the hepler slot to be used for interactive elements. |
cherry pick of vaadin/web-components#2232 for v14 cherry pick of vaadin/web-components#2256 for v14 Fixes vaadin/flow-components#955
cherry pick of vaadin/web-components#2232 for v14 Fixes vaadin/flow-components#955
cherry pick of vaadin/web-components#2232 for v14 add missing test Fixes vaadin/flow-components#955
cherry pick of vaadin/web-components#2232 for v14 Fixes vaadin/flow-components#955
cherry pick of vaadin/web-components#2232 for v14 Fixes vaadin/flow-components#955
cherry pick of vaadin/web-components#2232 for v14 cherry pick of vaadin/web-components#2256 for v14 Fixes vaadin/flow-components#955
cherry pick of vaadin/web-components#2232 for v14 add missing test Fixes vaadin/flow-components#955
cherry pick of vaadin/web-components#2232 for v14 Fixes vaadin/flow-components#955
* fix: do not focus the field on helper element click cherry pick of vaadin/web-components#2232 for v14 Fixes vaadin/flow-components#955 * chore: move helper tests with own fixture into own suite also pick vaadin/web-components#2251 for v14 also pick vaadin/web-components#2256 for v14
This ticket/PR has been released with platform 14.6.7. For prerelease versions, it will be included in its final version. |
Tested with V14.4.0.alpha1 and the bookstore example:
In ProductForm.java I added a TextField as helper component to another TextField (and another TextField to that).
(For clarity: TextField A, has TextField B as a helper. TextField B has TextField C as a helper.)
When clicking either B or C the field A gets focused and all input lands there. However, when I tab through the fields I can enter text there.
The text was updated successfully, but these errors were encountered: