angular / angular/components

getRtlScrollAxisType detects incorrect RtlScrollAxisType for chrome

Đang mở
#28,209 3 bình luận 0 reaction 0 người được giao Xem trên GitHub
area: cdk/scrolling needs investigation P4
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

I recently upgraded to Angular ~16.2.10, and noticed that cdk-virtual-scroll-viewport is not working in RTL mode for horizontal scroll. Initial data is rendered but then on scroll subsequent records are not rendered.

On investigations I came to know that getRtlScrollAxisType is returning 2 (Inverted) instead of 1 (Negated). If I make it return 1 during debug, things start to work fine.

### Reproduction

StackBlitz link: https://stackblitz.com/edit/angular-yehn5j?file=src%2Fapp%2Fcdk-platform-overview-example.html
Steps to reproduce:
Notice that at the bottom of information, getRtlScrollAxisType is 2
![image](https://github.com/angular/components/assets/17024937/4e9b569d-82a9-4d99-b437-d94b9d2faeac)

### Expected Behavior

getRtlScrollAxisType() should return 1 for chrome.

### Actual Behavior

getRtlScrollAxisType() returns 2 for chrome

### Environment

- Angular: ~16.2.10
- CDK/Material: ~16.2.10
- Browser(s): Chrome 119.0.6045.160, Chrome 119.0.6045.200
- Operating System (e.g. Windows, macOS, Ubuntu): Windows 10 Pro

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Hướng nghiên cứu

Bắt đầu bằng cách tìm getRtlScrollAxisType trong mã CDK platform hoặc scrolling và tái hiện lỗi cuộn ngang RTL bằng ví dụ StackBlitz được liên kết trong Chrome. Xác minh loại trục được phát hiện và xác nhận rằng cdk-virtual-scroll-viewport hiển thị chính xác các bản ghi tiếp theo, đồng thời duy trì hành vi trong các trình duyệt được hỗ trợ khác.

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, web-dev
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
Đặc tả rõ ràng
Mức phù hợp với người mới
48/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.