Skip to content

bug(cdk/drag-drop): Cannot drag without scrolling on mobile devices. #21749

Closed
@shervin01

Description

@shervin01

This change (#21227) has broken dragging on mobile devices. On mobile dragging will also trigger scroll. To reproduce go here on a mobile device or use chrome's toggle device tool bar: https://material.angular.io/cdk/drag-drop/examples

Reproduction

Steps to reproduce:

  1. go here on a mobile device or use chrome's toggle device tool bar: https://material.angular.io/cdk/drag-drop/examples
  2. then scroll down a bit.
  3. then try to drag one of the boxes. You can see that screen also scrolls.

Expected Behavior

Screen should not scroll while dragging. You can see the desired behavior here: https://v10.material.angular.io/cdk/drag-drop/examples

Actual Behavior

Screen/Document scrolls while dragging

Environment

  • Angular: 11.1.1
  • CDK/Material: 11.1.1
  • Browser(s): Chrome
  • Operating System (e.g. Windows, macOS, Ubuntu): Tested on Android as well as Desktop chrome with toggle device set to iPhoneX

Metadata

Metadata

Assignees

Labels

P2The issue is important to a large percentage of users, with a workaroundarea: cdk/drag-drop

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions