Skip to content

cdk drag and drop - cdkDragDropped event not triggered #12086

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

Closed
pas2al opened this issue Jul 6, 2018 · 7 comments · Fixed by #12098
Closed

cdk drag and drop - cdkDragDropped event not triggered #12086

pas2al opened this issue Jul 6, 2018 · 7 comments · Fixed by #12098
Assignees
Labels
P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent

Comments

@pas2al
Copy link
Contributor

pas2al commented Jul 6, 2018

Bug

What is the expected behavior?

The drop event cdkDragDropped should trigger the custom method

What is the current behavior?

The demo app for drag drop has two lists (todo and done). The items in the list are not updated from the cdkDragDropped event. The associated drop(event: CdkDragDrop<string[]>){...} method is not called.

What are the steps to reproduce?

I created an example with the exact same implementation like in the material2 demo-app.
https://stackblitz.com/edit/angular-material2-issue-eemhuq

I also tried it with the complete material2 repository. Cloned the repository and started the demo app using gulp serve:devapp. Same problem, like in the stackblitz example.

Which versions of Angular, Material, OS, TypeScript, browsers are affected?

See stackblitz example

Based on the changes introduced in #11864 by @crisbeto

@crisbeto crisbeto self-assigned this Jul 6, 2018
@crisbeto crisbeto added the P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent label Jul 6, 2018
@crisbeto
Copy link
Member

crisbeto commented Jul 6, 2018

It seems like our demo app is using the wrong events. The proper name for it is dropped.

@pas2al
Copy link
Contributor Author

pas2al commented Jul 6, 2018

Ah, perfect. Found it in your source code. Thanks! Is there progress on the documentation for the cdk drag and drop? If you need any help i can start working on it. I am exploring your implementation.

@crisbeto
Copy link
Member

crisbeto commented Jul 6, 2018

I'll continue working on it a bit more over the next week, I was busy with other tasks this week. Also let's keep this issue open since it shows that the dragging is off when the page is scrolled.

@pas2al
Copy link
Contributor Author

pas2al commented Jul 6, 2018

the dragging is off when the page is scrolled

What do you mean by that?

@crisbeto crisbeto added the has pr label Jul 7, 2018
crisbeto added a commit to crisbeto/material2 that referenced this issue Jul 7, 2018
Fixes the `CdkDrag` sorting logic and preview positioning being thrown off by the page's scroll position.

Fixes angular#12086.
@crisbeto
Copy link
Member

crisbeto commented Jul 7, 2018

I mean that the logic that determines how the item should be sorted, as well as where to render the preview, seems to be thrown off when the page is scrolled down. I've submitted #12098 to fix it.

@pas2al
Copy link
Contributor Author

pas2al commented Jul 9, 2018

@josephperrott What about the fix #12092 for the demo app?

@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 9, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants