-
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
fix(form-field): outline gap not being calculated when element starts off invisible #13477
Conversation
private _outlineGapCalculationNeededImmediately = false; | ||
|
||
/** Whether the outline gap needs to be calculated next time the zone has stabilized. */ | ||
private _outlineGapCalculationNeededOnStable = false; |
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.
@mmalerba I'm not a fan of this extra flag, but it was necessary, because in some cases the resizing has to happen a little bit after change detection has run, otherwise the element may not be laid out yet. It may be worth considering removing the ngAfterContentChecked
and only relying on NgZone.onStable
, however I'm not sure whether it wouldn't cause users to see the wrong outline for a split second.
This makes the code really messy and it's something we've stated before isn't really supported (setting |
I agree that it's messy, but the reason I did it is that it's non-trivial for people to handle themselves. The issue with the workaround is that removing the |
Hi @crisbeto! This PR has merge conflicts due to recent upstream merges. |
3 similar comments
Hi @crisbeto! This PR has merge conflicts due to recent upstream merges. |
Hi @crisbeto! This PR has merge conflicts due to recent upstream merges. |
Hi @crisbeto! This PR has merge conflicts due to recent upstream merges. |
… off invisible Fixes the gaps for a `mat-form-field` with the `outline` appearance not being calculated properly if the element starts off as being invisible and then becomes visible later. Fixes angular#13328.
8e233d5
to
3a364f4
Compare
… off invisible (angular#13477) Fixes the gaps for a `mat-form-field` with the `outline` appearance not being calculated properly if the element starts off as being invisible and then becomes visible later. Fixes angular#13328.
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. |
Fixes the gaps for a
mat-form-field
with theoutline
appearance not being calculated properly if the element starts off as being invisible and then becomes visible later.Fixes #13328.