Skip to content

bug(Drag and Drop): Drag and Drop an SVG element fails on Angular 11 but works with Angular 7 #22592

@PierreLeBrun22

Description

@PierreLeBrun22

What are you trying to do?

I'm working on a project that needs to implement a drag and drop for SVG elements, so I'm trying to drag an svg element (rect / circle etc ...) into an svg tag which is the boundary element.

The problem :

When I implement drag and drop with Angular version 11, the SVG element disappears when I drag it. But when I choose to use Angular 7, it works like a charm.

What troubleshooting steps have you tried?

I tried to find out from which version the bug appears and it seems that this one appears in version 10 of angular. Indeed the drag and drop works with version 10.0.1 of "@ angular / cdk".

Reproduction

I made 2 Stackblitz examples to illustrate my question, you can find them here :

Angular 7: https://stackblitz.com/edit/angular-wmvtan-vcspfw?file=package.json

Angular 11: https://stackblitz.com/edit/angular-wmvtan-co9kyn?file=package.json

Metadata

Metadata

Assignees

Labels

needs triageThis issue needs to be triaged by the teamtroubleshootingThis issue is not reporting an issue, but just asking for help

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions