-
Notifications
You must be signed in to change notification settings - Fork 6.8k
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
bug(mat-form-field): updateOutlineGap does not recalculate when label is changed to be empty #23943
Labels
area: material/form-field
P3
An issue that is relevant to core functions, but does not impede progress. Important, but not urgent
Comments
crisbeto
added a commit
to crisbeto/material2
that referenced
this issue
Nov 11, 2021
… to empty label We had a condition where `updateOutlineGap` wouldn't do anything if the label is empty. The problem is that the label could start off with content and then switch to being empty. These changes set the gap labels to zero width if the gap element is empty. Fixes angular#23943.
andrewseguin
pushed a commit
that referenced
this issue
Jan 18, 2022
… to empty label (#23949) We had a condition where `updateOutlineGap` wouldn't do anything if the label is empty. The problem is that the label could start off with content and then switch to being empty. These changes set the gap labels to zero width if the gap element is empty. Fixes #23943. (cherry picked from commit d3123f9)
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
forsti0506
pushed a commit
to forsti0506/components
that referenced
this issue
Apr 3, 2022
… to empty label (angular#23949) We had a condition where `updateOutlineGap` wouldn't do anything if the label is empty. The problem is that the label could start off with content and then switch to being empty. These changes set the gap labels to zero width if the gap element is empty. Fixes angular#23943.
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
Description
Some logic in updateOutlineGap skips recalculation when the label content is falsy. This prevents the outlineGap from updating when the label is cleared. It seems like the same logic also prevents the outline gap from updating when the label is removed altogether. In these cases, instead of just returning, the outline should be restored to default.
Reproduction
https://stackblitz.com/edit/angular-nmdjyj
Steps to reproduce:
Expected Behavior
Focusing the form-field should show no outline gap
Actual Behavior
Focusing the form-field should shows an outline gap
Environment
The text was updated successfully, but these errors were encountered: