angular / angular/components

cdkDragStartDelay behavior has changed in version 8.1.0

Open
#16,614 6 comments 1 reaction 0 assignees View on GitHub
area: cdk/drag-drop P3
Dominant language
TypeScript
Stars
25k
Forks
6.8k
Avg merge
1d 8h
Merged PRs (30d)
91

Description

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

Contributor guide

Open the contributing guide

Research direction

Start by comparing the two linked StackBlitz reproductions for Angular CDK 8.0.0 and 8.1.0, focusing on cdkDragStartDelay and the click-then-immediate-move sequence. Trace the drag-drop implementation used by the reproductions and verify the behavior against the stated expected and actual results.

Written by the indexing model from the issue text.

Assessment

Tech stack
angular, typescript
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.