angular / angular/components

cdkDragStartDelay behavior has changed in version 8.1.0

Offen
#16,614 6 Kommentare 1 Reaktion 0 zugewiesene Personen Auf GitHub ansehen
area: cdk/drag-drop P3
Vorherrschende Sprache
TypeScript
Sterne
25k
Forks
6.8k
Ø Merge
1 T. 8 Std.
Gemergte PRs (30 T.)
91

Beschreibung

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

Beitragsleitfaden

Beitragsleitfaden öffnen

Rechercherichtung

Beginne mit dem Vergleich der beiden verlinkten StackBlitz-Reproduktionen für Angular CDK 8.0.0 und 8.1.0, wobei der Fokus auf cdkDragStartDelay und der Sequenz „Klicken und dann sofort bewegen“ liegt. Verfolge die von den Reproduktionen verwendete Drag-and-Drop-Implementierung und überprüfe das Verhalten anhand der angegebenen erwarteten und tatsächlichen Ergebnisse.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
angular, typescript
Bereich
frontend
Issue-Typ
Bug
Schwierigkeit
3/5
Geschätzter Aufwand
1-2 Tage
Aktivitätsstatus
Veraltet
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
38/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.