Repository navigation
fix: do not focus the field on helper element click - #2232
Merged
Merged
Conversation
knoobie
reviewed
Jul 12, 2021
web-padawan
reviewed
Jul 12, 2021
web-padawan
left a comment
Member
There was a problem hiding this comment.
I have checked the other implementations e.g. Material components:
https://material.io/components/text-fields
https://material-ui.com/components/text-fields/#form-props
In those cases, clicking the helper text does not focus the input.
So we probably can do the same and remove click listeners.
…in various components.
hdamr
marked this pull request as ready for review
July 13, 2021 09:16
knoobie
reviewed
Jul 13, 2021
web-padawan
reviewed
Jul 13, 2021
knoobie
reviewed
Jul 14, 2021
web-padawan
reviewed
Jul 14, 2021
|
Kudos, SonarCloud Quality Gate passed!
|
web-padawan
approved these changes
Jul 19, 2021
vaadin-bot
pushed a commit
that referenced
this pull request
Jul 19, 2021
web-padawan
pushed a commit
that referenced
this pull request
Jul 19, 2021
1 task done
alvarezguille
added a commit
to vaadin/vaadin-checkbox
that referenced
this pull request
Jul 21, 2021
cherry pick of vaadin/web-components#2232 for v14 cherry pick of vaadin/web-components#2256 for v14 Fixes vaadin/flow-components#955
alvarezguille
added a commit
to vaadin/vaadin-custom-field
that referenced
this pull request
Jul 21, 2021
cherry pick of vaadin/web-components#2232 for v14 Fixes vaadin/flow-components#955
alvarezguille
added a commit
to vaadin/vaadin-radio-button
that referenced
this pull request
Jul 21, 2021
cherry pick of vaadin/web-components#2232 for v14 add missing test Fixes vaadin/flow-components#955
alvarezguille
added a commit
to vaadin/vaadin-select
that referenced
this pull request
Jul 21, 2021
cherry pick of vaadin/web-components#2232 for v14 Fixes vaadin/flow-components#955
alvarezguille
added a commit
to vaadin/vaadin-text-field
that referenced
this pull request
Jul 21, 2021
cherry pick of vaadin/web-components#2232 for v14 Fixes vaadin/flow-components#955
This was referenced Jul 21, 2021
alvarezguille
added a commit
to vaadin/vaadin-checkbox
that referenced
this pull request
Jul 21, 2021
cherry pick of vaadin/web-components#2232 for v14 cherry pick of vaadin/web-components#2256 for v14 Fixes vaadin/flow-components#955
alvarezguille
added a commit
to vaadin/vaadin-radio-button
that referenced
this pull request
Jul 21, 2021
cherry pick of vaadin/web-components#2232 for v14 add missing test Fixes vaadin/flow-components#955
alvarezguille
added a commit
to vaadin/vaadin-select
that referenced
this pull request
Jul 21, 2021
cherry pick of vaadin/web-components#2232 for v14 Fixes vaadin/flow-components#955
alvarezguille
added a commit
to vaadin/vaadin-text-field
that referenced
this pull request
Jul 21, 2021
* 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
Contributor
|
@web-padawan I'm wondering.. did we miss the combo box? The issue is still there https://vaadin.com/docs/latest/example?path=component/combobox/combo-box-custom-entry-1.ts |
Member
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Some components that have
helper-textcapability, When theirhelper-textis set viaslotand a component likevaadin-text-fieldis put inside of them, the moment the user clicks on the input in the helper slot, the focus jumps to the component that sits higher than our input that is in theslot. There is also another problem withvaadin-select, When we have a button as helper text, click on that button causes thevaadin-selectinput to be opened automatically which is not our intended behaviour.This PR fixes this issue by removing
on-clickfrom various components that have such handler onhelper-textelement.It also fixes the issue with
vaadin-selectwhen a button is used inside helper, click on the button causes the select element to be opened, it fixes it by preventing default behaviour when helper text is clicked.Fixes vaadin/flow-components#955
Type of change
Checklist