Closed
Description
Is this a regression?
- Yes, this behavior used to work in the previous version
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:
- Add scale transform to parent component
- Add cdkDrag, cdkDragFreeDragPosition (required) and cdkDragScale to draggable element
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
- Angular: 18.2
- CDK/Material: 18.2
- Browser(s): Chrome
- Operating System (e.g. Windows, macOS, Ubuntu): macOS