This repository has been archived by the owner on Sep 5, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
fix(autocomplete): prevent flashing of invalid state #12064
Merged
Splaktar
merged 2 commits into
angular:master
from
shishkinilya:wip/fix-autocomplete-invalid-state-flashes
Dec 17, 2020
Merged
fix(autocomplete): prevent flashing of invalid state #12064
Splaktar
merged 2 commits into
angular:master
from
shishkinilya:wip/fix-autocomplete-invalid-state-flashes
Dec 17, 2020
Conversation
This file contains 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
- when user clicks on suggestion, input element lost focus and then programmatically get focused - again, add stop immediate propogation to prevent blur event handling by other handlers which - update ng-model validity state Fixes angular#10975
google-cla
bot
added
the
cla: yes
PR author has signed Google's CLA: https://opensource.google.com/docs/cla/
label
Dec 16, 2020
Splaktar
suggested changes
Dec 16, 2020
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for investigating this issue!
Splaktar
added
type: bug
P5: nice to have
These issues will not be fixed without community contributions.
ux: polish
in progress
Mainly for in progress PRs, but may be used for issues that require multiple PRs
labels
Dec 16, 2020
- function blur most often called without an argument Fixes angular#10975
Splaktar
removed
the
in progress
Mainly for in progress PRs, but may be used for issues that require multiple PRs
label
Dec 17, 2020
Splaktar
approved these changes
Dec 17, 2020
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. I verified this manually using the autocomplete floating label demo.
mmalerba
approved these changes
Dec 17, 2020
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
cla: yes
PR author has signed Google's CLA: https://opensource.google.com/docs/cla/
P5: nice to have
These issues will not be fixed without community contributions.
pr: lgtm
This PR has been approved by the reviewer
pr: merge ready
This PR is ready for a caretaker to review
type: bug
ux: polish
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.
PR Checklist
Please check your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
What is the current behavior?
When user click on suggestion item, input element lost focus, and then programmatically get focused again, in between these moments invalid state flashes
Also described in #10975
Fixes #10975
What is the new behavior?
Invalid state doesn't flash
Does this PR introduce a breaking change?
Other information
Perhaps you can help me, my branch fails the test in autocomplete.spec.js "shows the md-not-found template even if we have lost focus", and to be honest, I don't understand the meaning of this test. Why should the md-not-found element must be visible in case of focus loss? Plus, this does not match the actual behavior of the component, if the input element loses focus, the md-not-found element is also hidden.