-
Notifications
You must be signed in to change notification settings - Fork 6.8k
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): Breaking drag behavior when injecting CdkDrag directive into a component class. #28881
Comments
This appears to be caused by the |
here I was just testing where, what data I could get, and I discovered this behavior. The best option in this case is to get a directive using If this behavior cannot be corrected yet, then you can close this issue. What about getting incorrect indexes (current /previous) in the DROP function when dragging elements that are located in a multi-line content view?
Is it necessary to create a separate issue or not yet)))? |
Regarding the DI behavior: this is just how DI in Angular works so we can't do much about it. When you set As for the multi-line content: is that the same issue as #13372? |
@crisbeto |
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. |
Is this a regression?
The previous version in which this bug was not present was
n/a
Description
For "@angular/cdk": "^17.3.1"=> "@angular/cdk": "^17.3.4".
When you inject a drag-and-drop directive into a component class using a constructor or injection function, the drag-and-drop behavior breaks.
Reproduction
StackBlitz link: https://stackblitz.com/~/github.com/evheniyrz/angular-cdk-drag-handle
component:
src/app/pages/drop-sorting-implementation/drop-sorting-implementation.component.ts
Steps to reproduce:
cdkDropListGroup
=>cdkDropList
CdkDrag
directive into a component class using a constructor or injection functionExpected Behavior
the process of dragging elements is not disrupted
Actual Behavior
the entire
CdkDropListGroup
element moves following the mouse cursorEnvironment
The text was updated successfully, but these errors were encountered: