bug(CdkDrag): Set free drag position doesn't take scale into consideration on first drag event #29737
Labels
area: cdk/drag-drop
P3
An issue that is relevant to core functions, but does not impede progress. Important, but not urgent
Is this a regression?
The previous version in which this bug was not present was
No response
Description
When using a parent scaled component and cdkDragFreeDragPosition with cdkDragScale, on first drag the element jumps and then the draging works correctly.
Reproduction here
https://stackblitz.com/edit/stackblitz-starters-9kq1ej?file=src%2Fmain.ts
My guess is that passive transform in drag ref does not update to take scale into consideration
https://github.com/angular/components/blob/main/src/cdk/drag-drop/drag-ref.ts#L594
Reproduction
StackBlitz link:
https://stackblitz.com/edit/stackblitz-starters-9kq1ej?file=src%2Fmain.ts
Steps to reproduce:
Expected Behavior
On drag when using scale, the element should not jump
Actual Behavior
When using a parent scaled component and cdkDragFreeDragPosition with cdkDragScale, on first drag the element jumps and then the draging works correctly.
Environment
The text was updated successfully, but these errors were encountered: