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(CDK DragAndDrop): Occasional Fatal Error similar to closed issue #19359 #20623
Comments
It's a little hard to deconstruct what might be going on based on the code alone. Can you post an example that shows it breaking? You can open one of the examples from the docs (https://material.angular.io/cdk/drag-drop/examples) and fork it on Stackblitz. |
You can use the same example from the other issue: https://stackblitz.com/edit/angular-9-material-drag-drop?file=src%2Fapp%2Fapp.component.html Broke after 4 d&d attempts for me. |
I was able to reproduce this is an angular component. Specifically when you utilize a table and have elements inside of the table rows that are drag and droppable. |
Great, thank you. Thanks |
I followed this StackBlitz, updated the dependencies, enabled Ivy, and am not seeing any errors when drag and dropping (Chrome). After doing these steps, is there a specific sequence of drag-drops you can do to replicate the error?
@sammaphey Can you post a StackBlitz? |
For me, it happens completely randomly. Sometimes after 4 d&ds, but then one time it took more than 20. |
@mwawrusch are you sure that you're on the latest version of |
@crisbeto Just saw this, thanks. |
So after testing with 10.2.3 and the latest angular we still see this behavior, but less. It looks to me that it happens when the source for the list of draggable items is updated at the wrong moment in time. Here are the versions we used.
|
Can you post a step-by-step of the drags that you're making? I did manage to reproduce a similar error if I slow down the transitions a lot (250ms to 2500ms) and I start dragging from a connected list while an item from another list is finishing its animation. Does the error happen when you're making a lot of quick drags one after the other? |
…ainer Currently we have a restriction that prevents users from starting a new drag sequence if an item within the same container is being dragged, however they can start one from a connected container and pull the item into the active one and start dragging it there. This can cause an error if it happens while the item's drop animation is running. These changes add an extra check so that dragging can't be started out of a connected container either. Relates to angular#20623.
…ainer (#20704) Currently we have a restriction that prevents users from starting a new drag sequence if an item within the same container is being dragged, however they can start one from a connected container and pull the item into the active one and start dragging it there. This can cause an error if it happens while the item's drop animation is running. These changes add an extra check so that dragging can't be started out of a connected container either. Relates to #20623.
…ainer (#20704) Currently we have a restriction that prevents users from starting a new drag sequence if an item within the same container is being dragged, however they can start one from a connected container and pull the item into the active one and start dragging it there. This can cause an error if it happens while the item's drop animation is running. These changes add an extra check so that dragging can't be started out of a connected container either. Relates to #20623. (cherry picked from commit 6d86f0f)
…ainer (angular#20704) Currently we have a restriction that prevents users from starting a new drag sequence if an item within the same container is being dragged, however they can start one from a connected container and pull the item into the active one and start dragging it there. This can cause an error if it happens while the item's drop animation is running. These changes add an extra check so that dragging can't be started out of a connected container either. Relates to angular#20623.
Reproduction
Drag and drop a few times (5 to 20). The error below pops up. Looks similar to closed issue 19359
Code looks like this:
Expected Behavior
No bugs...
Actual Behavior
What behavior did you actually see?
Environment
The text was updated successfully, but these errors were encountered: