bug(table): Table with sticky header 'jumping'
- 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
_No response_
### Description
When scrolling, a table with a sticky header "jumps" if you add an element that has a absolute position. For example, if you display the tooltip and scroll, then the sticky header will change position for a short time.
This is also true with the mat-progress-bar element.
### Reproduction
StackBlitz link:
Steps to reproduce:
1. Open [link](https://stackblitz.com/edit/gatzhq-oe6hfq?file=src%2Fexample%2Ftable-sticky-header-example.ts)
2. The sticky header changes the position on scroll when there is another element on the page with absolute position
https://github.com/angular/components/assets/16895663/bf5172c5-8cba-4a0b-b5da-89afab55d7ee
### Expected Behavior
The sticky header should not change position on scroll when there is another element on the page with an absolute position
### Actual Behavior
The sticky header changes the position on scroll when there is another element on the page with absolute position
### Environment
- Angular: v12, v15, v16
- CDK/Material: v12, v15, v16
- Browser(s): **Chrome Version 114.0.5735.110 (Official Build) (64-bit)**
- Operating System (e.g. Windows, macOS, Ubuntu): **Windows**
Hướng dẫn đóng góp
Hướng nghiên cứu
Bắt đầu với bản tái hiện StackBlitz được liên kết và xác nhận hiện tượng sticky-header nhảy khi cuộn trong lúc tooltip hoặc mat-progress-bar xuất hiện. Sau đó, lần theo phần triển khai sticky-header của bảng và các test liên quan trong Angular components repository. Hoàn thành khi header vẫn ổn định trong lúc cuộn trong khi có một phần tử khác được định vị tuyệt đối.
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ó
- 4/5
- Thời gian dự kiến
- 3-5 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
- 35/100