bevacqua / dragula

:ok_hand: Drag and drop so simple it hurts
https://bevacqua.github.io/dragula/
MIT License
22.01k stars 1.97k forks source link

Issues with videos in Chrome #554

Closed laggingreflex closed 4 years ago

laggingreflex commented 6 years ago

Awesome library!

Found an issue with videos and Chrome. Repro: http://jsfiddle.net/1k7ke9f3/

Dragging the video causes it to pause for some reason. Only in chrome, works in FF, not tested in others.

sweidac commented 6 years ago

I didn't dig too much into it, but it seems like Chromes implementation of cloneNode() does not clone the state of a video element.

As a quick fix, i think you can use Dragula's event system to manually propagate the current time of the video to the clone.

dcantatore commented 4 years ago

@laggingreflex Try using the on drag event to get the videos current state like @tuberains said, then on drop set the video time.