Skip to content

Ability to delay dragging event by X milliseconds  #13908

Closed
@MortPed

Description

@MortPed

Bug, feature request, or proposal:

Feature request

What is the expected behavior?

Set property to delay dragging event by X milliseconds
<div cdkDrag cdkDragDelay="2000">Hold for 2 seconds to move this item</div>

What is the current behavior?

No option to prevent dragging on initial touch rendering this very hard to use on mobile.
(This is certainly not helped by the fact that cdkDrag elements disable mobile scroll events)

What is the use-case or motivation for changing an existing behavior?

Currently click events immediately trigger leading to unintended re-ordering. Many sites and native devices solves this issue by not starting the drag event unless user have clicked and hold the object for a short amount of time.

Which versions of Angular, Material, OS, TypeScript, browsers are affected?

@angular/cdk: 7.0.2

Metadata

Metadata

Assignees

Labels

featureThis issue represents a new feature or feature request rather than a bug or bug fix

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions