Closed akorchev closed 8 years ago
That is much simpler than I was expecting. Do you think you could add some tests and maybe an example?
I can definitely create an example. Not sure how to create tests though. This is only half of the solution - the other half is to get the dragDropManager to the iframe which I will show in the example.
Here is the example: https://github.com/akorchev/react-dnd-cross-frame
Thanks. I don't promise to support or test this in the future but I see no harm in adding it. :+1:
Note that I still reference window
in a couple of places so this won't cover all cases. There's a couple of places where I add a mousemove
listener on window
, and it's important to do this lazily for better perf. I'm open to merging more PRs handling this but I won't work on it myself.
Extracted two methods from
setup
andteardown
that will allow me to attach the backend to aniframe
. I need aDropTarget
to live inside aniframe
. Here is how I would do it