-
Notifications
You must be signed in to change notification settings - Fork 6.8k
fix(material-experimental/mdc-form-field): make sure fonts are loaded… #21245
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
Conversation
|
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
… before calculating notch width
Some tweaks to make sure this change works in async tests as zone.js doesn't patch the FontFaceSet API and to account for really slow connections. |
… before calculating notch width (angular#21245)
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. |
… before calculating notch width
The label width was being calculated before the fonts were loaded which caused the label to be cut off sometimes. By calculating the width after
fonts.ready
resolves we can be sure that the label will be the correct size.Note that the workaround for IE is not perfect as depending on the connection speed the font still might not be loaded after the time out.
Before:

After:
