-
Notifications
You must be signed in to change notification settings - Fork 6.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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
Comments
crisbeto
added
P3
An issue that is relevant to core functions, but does not impede progress. Important, but not urgent
area: cdk/drag-drop
and removed
needs triage
This issue needs to be triaged by the team
labels
Sep 16, 2024
crisbeto
added a commit
to crisbeto/material2
that referenced
this issue
Sep 16, 2024
Fixes that the scale was only being synced when the user drags, but we need it also when setting the free drag position. Fixes angular#29737.
crisbeto
added a commit
that referenced
this issue
Sep 17, 2024
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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:/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: