angular / angular/components

cdkDragStartDelay behavior has changed in version 8.1.0

Đang mở
#16,614 6 bình luận 1 reaction 0 người được giao Xem trên GitHub
area: cdk/drag-drop P3
Ngôn ngữ chính
TypeScript
Star
25k
Fork
6.8k
Merge trung bình
1 ngày 8 giờ
Pull request đã merge (30 ngày)
91

Mô tả

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

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Hướng nghiên cứu

Bắt đầu bằng cách so sánh hai bản tái hiện StackBlitz được liên kết cho Angular CDK 8.0.0 và 8.1.0, tập trung vào cdkDragStartDelay và chuỗi nhấp rồi di chuyển ngay lập tức. Truy vết triển khai kéo và thả được các bản tái hiện sử dụng và kiểm tra hành vi dựa trên các kết quả mong đợi và thực tế đã nêu.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
angular, typescript
Lĩnh vực
frontend
Loại issue
Lỗi
Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
38/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.