bug(MAT-ERROR): mat error content with block element gives extra space of 16px
- Ngôn ngữ chính
- TypeScript
- Star
- 25k
- Fork
- 6.8k
- Merge trung bình
- 1 ngày 8 giờ
- Pull request đã merge (30 ngày)
- 91
Mô tả
### 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
Hướng dẫn đóng góp
Hướng nghiên cứu
Bắt đầu với ví dụ StackBlitz được liên kết tại src/example/form-field-error-example.html và tái hiện sự cố bằng cách đặt tiêu điểm rồi bỏ tiêu điểm khỏi trường. So sánh cách Angular 16 Material hiển thị lỗi với vị trí mong đợi; được xem là hoàn thành khi nội dung lỗi của phần tử block xuất hiện ngay bên dưới trường nhập liệu mà không có khoảng cách thừa 16px.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- angular, typescript
- Lĩnh vực
- frontend
- Loại issue
- Lỗi
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 48/100