-
Notifications
You must be signed in to change notification settings - Fork 6.8k
Description
Is this a regression?
- Yes, this behavior used to work in the previous version
The previous version in which this bug was not present was
14
Description
We basically wrap the content of every tag in our source code. After upgrading Material to v15, we noticed that the whitespaces which are rendered around the content of an element annotated with mat-dialog-title are also visible on the UI. This was not the case in Material v14. In both versions when inspecting the DOM, you can see that whitespaces are visible around the text. The following example illustrates the problem:
This ...
<h2 mat-dialog-title>
Text content
</h2>
... will be rendered as " Text content " in the DOM.
In Material v14 these whitespaces were simply ignored in by the MatDialogTitle, but since v15 they are actually visible on the UI as described above.
Reproduction
Steps to reproduce:
- Wrap content of a tag annotated with mat-dialog-title
- Inspect the DOM in the browser (Chrome)
- See the rendered whitespace in front of the text
Expected Behavior
The whitespaces are ignored by MatDialogTitle
Actual Behavior
The whitespaces are visible on the UI like " Text content "
Environment
- Angular: 15.2.4
- CDK/Material: 15.2.4
- Browser(s): Chrome (110.0.5481.177 (Offizieller Build) (x86_64))
- Operating System (e.g. Windows, macOS, Ubuntu): macOS Ventura

