angular / angular/components

cdkDragStartDelay behavior has changed in version 8.1.0

未关闭
#16,614 6 条评论 1 个 reaction 已指派 0 人 在 GitHub 查看
area: cdk/drag-drop P3
主要语言
TypeScript
星标
25k
派生
6.8k
平均合并
1 天 8 小时
30 天内合并 PR
91

描述

It seems that the behavior of drag start delay has been changed between Angular CDK versions 8.0.0 and 8.1.0. I think this is a breaking change since it completely changes the way users interact with draggable items. I am not sure if the current behavior is really intended.

#### Reproduction

8.0.0: https://stackblitz.com/edit/angular-cdkdragstartdelay-80
8.1.0: https://stackblitz.com/edit/angular-cdkdragstartdelay-81

Steps to reproduce:
1. Click on any item.
2. Try to drag it as soon as possible.


#### Expected Behavior

In the previous version it did not matter if the mouse was clicked or immediately moved. The dragging started anyway after the specified delay.

#### Actual Behavior

In the current version the item is not being dragged when you move the mouse immediately after the initial click. It only works if you stay at the click position for the specified delay time and then move the mouse.

#### Environment

- Angular: 8.0.0+
- CDK/Material: 8.1.0+
- Browser(s): Google Chrome
- Operating System (e.g. Windows, macOS, Ubuntu): Fedora Linux 29

贡献指南

打开贡献指南

调研方向

首先比较 Angular CDK 8.0.0 和 8.1.0 的两个链接 StackBlitz 复现,重点关注 cdkDragStartDelay 以及点击后立即移动的操作序列。跟踪这些复现所使用的拖放实现,并根据所述的预期结果和实际结果验证其行为。

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

评估

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

把新 issue 发到你的邮箱

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