bug(MAT-ERROR): mat error content with block element gives extra space of 16px
- Vorherrschende Sprache
- TypeScript
- Sterne
- 25k
- Forks
- 6.8k
- Ø Merge
- 1 T. 8 Std.
- Gemergte PRs (30 T.)
- 91
Beschreibung
### Is this a regression?
- [X] Yes, this behavior used to work in the previous version
### The previous version in which this bug was not present was
14.2.7
### Description
If the error message is rendered within a block element (we have some error message which are from a database and have a div element), an extra space is added. If this done by design, maybe it should also be mentioned in the docs?
Look at this example: https://stackblitz.com/edit/g5mias?file=src%2Fexample%2Fform-field-error-example.html
### Reproduction
StackBlitz link: https://stackblitz.com/edit/g5mias?file=src%2Fexample%2Fform-field-error-example.html
Steps to reproduce:
1. focus and blur the field
### Expected Behavior
Render the error messages directly underneath the input field
### Actual Behavior
The error messages are shown 16px below the input field
### Environment
- Angular: 16 latest
- CDK/Material: 16 latest
Beitragsleitfaden
Rechercherichtung
Beginne mit dem verknüpften StackBlitz-Beispiel unter src/example/form-field-error-example.html und reproduziere das Problem, indem du das Feld fokussierst und den Fokus wieder entfernst. Vergleiche die Fehlerdarstellung von Angular 16 Material mit der erwarteten Platzierung; als abgeschlossen gilt es, wenn der Fehlerinhalt des Blockelements direkt unter dem Eingabefeld ohne den zusätzlichen Abstand von 16px erscheint.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- angular, typescript
- Bereich
- frontend
- Issue-Typ
- Bug
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 48/100