bug(mat-slider): on Firefox, slider thumb is not aligned with cursor

未关闭 适合新手
#34,094 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

@Devyalamaddi 已经在做这个了。

开始于 2026年11月10日。

  • #34106 来自 @Devyalamaddi —— 未关闭

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
62/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
活跃
领域
frontend

调研方向

从 Material slider 的实现及其拖动位置处理开始,然后检查 slider 测试中是否覆盖了指针位置对齐。使用 issue 中链接的 slider 概览,在 Firefox 中复现所报告的行为。当滑块在轨道两端附近都能与光标保持对齐,且相关测试通过时,即为完成。

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

描述

area: material/slider P4
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

On Firefox, when clicking and dragging on a slider, the slider thumb is not aligned with the cursor. This is most visible near the ends of the slider track.

Reproduction

https://material.angular.dev/components/slider/overview

Expected Behavior

The thumb stays aligned with the cursor.

Actual Behavior

The thumb is closer to the center of the track than the cursor is.

https://github.com/user-attachments/assets/09e954c3-e949-428d-a595-ea804a9b1c66

Environment
  • Angular: 22.2.4
  • CDK/Material: 22.2.6
  • Browser(s): Firefox 159.0.1
  • Operating System: Windows
主要语言
TypeScript
星标
25k
派生
6.9k
平均合并
2 天 7 小时
30 天内合并 PR
83

环境准备

  • 没有 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 阅读贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

angular/components 的其他 Issue

查看 angular/components 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

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