Skip to content
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

fix(mat-form-field mat-error mat-label): labels and errors on form fields are affecting one another on focus / hover with noticeable opacity applied on transition #21612

Closed
kanehjeong opened this issue Jan 16, 2021 · 1 comment · Fixed by #21620
Assignees
Labels
area: material/form-field P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent

Comments

@kanehjeong
Copy link

Reproduction

Use StackBlitz to reproduce your issue:

Steps to reproduce:

  1. Use dark theme in material (this step may not be required, but it's more obvious when viewing it)
  2. Click each form field and click out of it to invoke 'required' error on all of them. Then click each individual one and notice the transition styles being applied on other ones.

Expected Behavior

Clicking each form field should cause a transition and style change that does not affect other form fields.

Actual Behavior

Clicking each form field seems to apply styles on other ones on transition when the field is focused or hovered. In particular, it seems like there is some hierarchy in which the styles are applied.

i.e. Clicking the first form field will apply transition styles on every element. Clicking the second form field will apply styles on itself (not the first field) and every element after, and so on.

Environment

  • Angular: 11.0.4
  • CDK/Material: 11+
  • Browser(s): Chrome
  • Operating System (e.g. Windows, macOS, Ubuntu): Windows

On a similar topic, is there a possible way to override the styles to not apply these focus/hover styles? I can't find the place where the styles are being applied but it seems to give some opacity and make the font weight smaller. In darker themes, this transition style seems very obvious and looks weird. I'd rather the style be consistent during transition or not apply it at all.

@kanehjeong kanehjeong added the needs triage This issue needs to be triaged by the team label Jan 16, 2021
@kanehjeong kanehjeong changed the title help(mat-form-field mat-error): labels and errors on form fields are affecting one another on focus / hover with noticeable opacity applied on transition fix(mat-form-field mat-error): labels and errors on form fields are affecting one another on focus / hover with noticeable opacity applied on transition Jan 16, 2021
@kanehjeong kanehjeong changed the title fix(mat-form-field mat-error): labels and errors on form fields are affecting one another on focus / hover with noticeable opacity applied on transition fix(mat-form-field mat-error mat-label): labels and errors on form fields are affecting one another on focus / hover with noticeable opacity applied on transition Jan 16, 2021
@crisbeto crisbeto added area: material/form-field P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent and removed needs triage This issue needs to be triaged by the team labels Jan 18, 2021
@crisbeto crisbeto self-assigned this Jan 18, 2021
crisbeto added a commit to crisbeto/material2 that referenced this issue Jan 18, 2021
…hrome

Fixes some flickering in all adjacent form fields that happens when a specific form field
is in its invalid state and the user hovers over it.

Fixes angular#21612.
andrewseguin pushed a commit that referenced this issue Jan 25, 2021
…hrome (#21620)

Fixes some flickering in all adjacent form fields that happens when a specific form field
is in its invalid state and the user hovers over it.

Fixes #21612.
andrewseguin pushed a commit that referenced this issue Jan 25, 2021
…hrome (#21620)

Fixes some flickering in all adjacent form fields that happens when a specific form field
is in its invalid state and the user hovers over it.

Fixes #21612.

(cherry picked from commit ac121f8)
wagnermaciel pushed a commit to wagnermaciel/components that referenced this issue Jan 26, 2021
…hrome (angular#21620)

Fixes some flickering in all adjacent form fields that happens when a specific form field
is in its invalid state and the user hovers over it.

Fixes angular#21612.
mmalerba pushed a commit to mmalerba/components that referenced this issue Jan 29, 2021
…hrome (angular#21620)

Fixes some flickering in all adjacent form fields that happens when a specific form field
is in its invalid state and the user hovers over it.

Fixes angular#21612.
wagnermaciel pushed a commit to wagnermaciel/components that referenced this issue Feb 8, 2021
…hrome (angular#21620)

Fixes some flickering in all adjacent form fields that happens when a specific form field
is in its invalid state and the user hovers over it.

Fixes angular#21612.
wagnermaciel pushed a commit to wagnermaciel/components that referenced this issue Feb 8, 2021
…hrome (angular#21620)

Fixes some flickering in all adjacent form fields that happens when a specific form field
is in its invalid state and the user hovers over it.

Fixes angular#21612.
@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 25, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area: material/form-field P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants