Black Lives Matter. Please consider donating to Black Girls Code today.

Drag and drop div with internal plotly chart to another div, modebar unresponsive

I’m in the process of creating a page with multiple charts and want the ability to drag and drop the plotly container. After successfully drag and dropping, the plotly modebar and click+drag selection no longer works. How do I “reset” or give back focus to the plotly modebar and clickdrag selection? Here’s a codepen with the issue (drag container from outside of modebar or chart to the right): https://codepen.io/bmarker/pen/rLorBm

Here’s my attempt: https://codepen.io/etpinard/pen/YWdGOz

I chose to transfer the graph’s data and layout on drag and then use Plotly.newPlot on drop. I hope this helps.

Thanks @etienne , good solution!