substance icon indicating copy to clipboard operation
substance copied to clipboard

Substance breaks external DnD

Open vad3x opened this issue 8 years ago • 2 comments

When I have external drag and drop (not related to substance) on my page (SPA) I'm getting next warning: Not in a valid drag state. and the DragEvent is stopped.

It seems to me that it happens because DragManager handles all document events and _stop function stops the events when a target can not be unwrapped.

vad3x avatar Mar 09 '17 07:03 vad3x

I had the same problem, with substance beta 6 breaking the drag and drop functionality on a different page of my SPA app.

I solved it by manually running the dispose function of the DragManager when disposing the editor. this.editorSession.dragManager.dispose()

Of course, the solution works only when you don't need the app's dnd and substance's dnd at the same time.

@michael @oliver Is there a way to never load the drag manager and keep it optional?

yannisbarlas avatar Mar 20 '17 14:03 yannisbarlas

@yannisbarlas, thanks for your response. I have external DnD on the same page, so I'm not able to dispose the editor.

vad3x avatar Mar 20 '17 14:03 vad3x