Skip to content

fix(autocomplete): marking element as touched too early when clicking on options #13773

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

Closed

Conversation

crisbeto
Copy link
Member

Currently we mark the autocomplete's CVA as touched on each blur event, which can happen a little too early if the user holds their pointer while clicking on an item, causing the form validation to show up too early. These changes defer marking the element as touched until the panel has closed.

Fixes #13732.

@crisbeto crisbeto added the target: patch This PR is targeted for the next patch release label Oct 23, 2018
@googlebot googlebot added the cla: yes PR author has agreed to Google's Contributor License Agreement label Oct 23, 2018
jelbourn
jelbourn previously approved these changes Oct 24, 2018
Copy link
Member

@jelbourn jelbourn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@jelbourn jelbourn added pr: lgtm action: merge The PR is ready for merge by the caretaker labels Oct 24, 2018
@ngbot
Copy link

ngbot bot commented Oct 24, 2018

I see that you just added the pr: merge ready label, but the following checks are still failing:
    failure status "continuous-integration/travis-ci/pr" is failing
    failure status "ci/circleci: e2e_tests" is failing

If you want your PR to be merged, it has to pass all the CI checks.

If you can't get the PR to a green state due to flakes or broken master, please try rebasing to master and/or restarting the CI job. If that fails and you believe that the issue is not due to your change, please contact the caretaker and ask for help.

@crisbeto crisbeto force-pushed the 13732/autocomplete-premature-touched branch from f996b22 to 30256f7 Compare October 25, 2018 17:35
@crisbeto crisbeto force-pushed the 13732/autocomplete-premature-touched branch from 30256f7 to 3a2e624 Compare December 13, 2018 17:47
@crisbeto crisbeto force-pushed the 13732/autocomplete-premature-touched branch from 3a2e624 to 00c37d2 Compare December 25, 2018 14:17
@mmalerba mmalerba added aaa and removed aaa labels Apr 25, 2019
@andrewseguin andrewseguin added the P4 A relatively minor issue that is not relevant to core functions label May 30, 2019
@francesconi
Copy link

Is there any news?

@crisbeto crisbeto force-pushed the 13732/autocomplete-premature-touched branch from 00c37d2 to 0cd5f45 Compare October 3, 2019 19:19
… on options

Currently we mark the autocomplete's CVA as touched on each `blur` event, which can happen a little too early if the user holds their pointer while clicking on an item, causing the form validation to show up too early. These changes defer marking the element as touched until the panel has closed.

Fixes angular#13732.
@crisbeto crisbeto force-pushed the 13732/autocomplete-premature-touched branch from 0cd5f45 to 518ee59 Compare October 7, 2019 20:40
@mmalerba mmalerba removed the lgtm label Jul 31, 2020
@andrewseguin andrewseguin added needs rebase and removed cla: yes PR author has agreed to Google's Contributor License Agreement labels Dec 29, 2021
@andrewseguin andrewseguin removed the P4 A relatively minor issue that is not relevant to core functions label Mar 28, 2022
@andrewseguin andrewseguin assigned crisbeto and unassigned jelbourn Apr 22, 2022
@josephperrott josephperrott added action: cleanup The PR is in need of cleanup, either due to needing a rebase or in response to comments from reviews and removed needs rebase labels Nov 16, 2022
@josephperrott josephperrott requested review from a team as code owners December 18, 2024 17:40
@josephperrott josephperrott removed the request for review from a team December 18, 2024 17:40
@josephperrott josephperrott requested review from amysorto and mmalerba and removed request for a team December 18, 2024 17:40
@crisbeto
Copy link
Member Author

crisbeto commented Jan 9, 2025

This is basically the same as #11908.

@crisbeto crisbeto closed this Jan 9, 2025
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Feb 9, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
action: cleanup The PR is in need of cleanup, either due to needing a rebase or in response to comments from reviews action: merge The PR is ready for merge by the caretaker target: patch This PR is targeted for the next patch release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

mat-autocomplete validates when option is active
7 participants