madebymany / sir-trevor-js

Rich content editing entirely re-imagined for the web
http://madebymany.github.io/sir-trevor-js/
MIT License
4.51k stars 399 forks source link

`onDragStart` cannot move iframes/embeds #550

Closed prdanelli closed 2 years ago

prdanelli commented 6 years ago

I am not entirely sure of the underlying issues which cause video/iframe/embed blocks to cause ST onDragStart to fail before completing the block drag event, however it affects all iframes, even the Video block that comes with ST by default. The st-drag-element class is added to the element, but then all handles are removed and the element is rendered without content.

By removing the following lines of code the user is still able to see where the block is being moved to and the drag event is able to finish successfully with all blocks, text, video, custom iframe.

This PR is related to https://github.com/madebymany/sir-trevor-js/issues/549