angular / angular/components

getRtlScrollAxisType detects incorrect RtlScrollAxisType for chrome

未关闭
#28,209 3 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
area: cdk/scrolling needs investigation P4
主要语言
TypeScript
星标
25k
派生
6.8k
平均合并
1 天 8 小时
30 天内合并 PR
91

描述

### 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

贡献指南

打开贡献指南

调研方向

首先在 CDK platform 或 scrolling 代码中定位 getRtlScrollAxisType,并使用 Chrome 中链接的 StackBlitz 示例重现 RTL 水平滚动失败的问题。验证检测到的轴类型,并确认 cdk-virtual-scroll-viewport 能正确渲染后续记录,同时保持在其他受支持浏览器中的行为不变。

由索引模型根据 Issue 内容生成。

评估

技术栈
angular, typescript
领域
frontend, web-dev
Issue 类型
缺陷
难度
3/5
预计耗时
1-2 天
活跃度
停滞
描述清晰度
描述清楚
新手友好度
48/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。