You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
bug(form-field): notch width is out of sync with custom label content during layout changes #33207
Yes, this behavior used to work in the previous version
The previous version in which this bug was not present was
No response
Description
The MDC-based mat-form-field (outline appearance) fails to synchronously update the notch (gap) width when the content inside mat-label changes its layout or when the container is resized. This is especially evident when using custom components with Flexbox inside the label (e.g., for adding help icons or tooltips).
Create a mat-form-field with appearance="outline" and floatLabel="always".
Apply display: flex to the mat-label (or a container immediately inside it).
Place a text string and an icon (e.g., mat-icon) inside that flex container.
Dynamically change the width of the form field's container (e.g., by resizing the browser window or using a slider in the provided reproduction).
Observe the behavior of the label content and the notch gap.
Expected Behavior
The notch gap should resize synchronously with the label content to prevent any "sliding" or "drifting" effect. The gap in the outline should always match the actual width of the floating label in real-time during container resizing or layout shifts, ensuring that the border never overlaps the label's text or icons.
Actual Behavior
There is a significant visual lag in the label's positioning and scaling. While the browser's layout engine expands the container instantly, the label's text content moves and resizes with a delay.
In this implementation, we intentionally prioritize the visibility of the tooltip/icon over the label text.. This ensures that the help trigger is always accessible to the user, even on small screens
I spent a bit of time looking into it, but couldn't find a solution. My best guess is that the ResizeObserver we're using under the hood has some sort of built in debounce mechanism.
Activity
crisbeto commentedon May 7, 2026
I spent a bit of time looking into it, but couldn't find a solution. My best guess is that the
ResizeObserverwe're using under the hood has some sort of built in debounce mechanism.thisiself commentedon Sep 22, 2026
I have same issue, but with just "overflow: ellipsis" for label:
https://stackblitz.com/edit/jrxg5zhm?file=src%2Fexample%2Fform-field-error-example.html&startScript=start