angular / angular/components

bug(mat-slider): mobile device scrolling can break slider internal state

未关闭
#28,130 4 条评论 1 个 reaction 已指派 0 人 在 GitHub 查看
Accessibility android area: material/slider ios P3
主要语言
TypeScript
星标
25k
派生
6.8k
平均合并
1 天 8 小时
30 天内合并 PR
91

描述

### Is this a regression?

- [ ] Yes, this behavior used to work in the previous version

### The previous version in which this bug was not present was

_No response_

### Description

Scrolling on a mobile device can break the mat-slider's internal state such that the slider still thinks it is in an active dragging state when it is not

The root cause of the issue is that for some reason, the pointerup event never gets triggered when the user stops scrolling

### Reproduction

- Visit any webpage that has a mat-slider
- Scroll down with the pointerdown originating from the mat-slider
- Stop scrolling

### Expected Behavior

The mat-slider is in an inactive state

### Actual Behavior

The mat-slider is still in the active state

### Environment

- Angular: 17
- CDK/Material: 17
- Browser(s): chrome
- Operating System (e.g. Windows, macOS, Ubuntu): ios

贡献指南

打开贡献指南

调研方向

在包含 mat-slider 的 iOS Chrome 页面上,通过在 slider 上触发 pointerdown 开始滚动来重现该问题。跟踪 slider 的 pointer-event 处理,并验证滚动在没有 pointerup 的情况下停止后,slider 会恢复到非活动状态。

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

评估

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

把新 issue 发到你的邮箱

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