Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
interact in an iFrame #97
First off, I absolutley love this library. It is really well done and I find it really useful.
I can get interact to work fine under normal conditions. Now, I'm trying to activate interact from a parent frame. Here is the code:
I'm really stumped as to what could be causing the issue. If you have any ideas, let me know!
I didn't develop interact.js with iFrames in mind but it would make a lot of sense to change that. A similar issue was opened before but I had been too busy working on multiple interactions to really look into it. Now I should have time to try to get this done.
So what you want is to be able to use the
Thank you so much. I really love everything about this library. It is sooo good. The inertia is especially beautiful.
Yes I'll explain more about the use case I'm trying to do. More or less I'm creating a wysiwyg editor. I have one page that has many divs, images, and text. Then I'm making an "editor" that loads this page with divs, images, and text in an iFrame. Then the editor is trying to reach into the iframe to invoke your interact library. We have control over both the editor and child page so it is not a problem to load the interact.js library where needed.
Thanks again and let me know if I can help provide any more details about the use case or other assistance.
Hi again. I re-read your comment. I want to clarify, just in case, I'm to interact with the child using the parent object. I tried
referenced this issue
Nov 9, 2014
Hey. Thanks, that cleared things up perfectly.
I've done some work which should now make dragging accross accessible frames work in any direction (either the parent or child frame can own
Using that file, the code that you wrote above should work. With selector Interactables, you need the context setting. However, If you're passing an element directly like
then giving the context isn't necessary. There are still a few things to do – cross-frame dropzones don't work, there are coordinate inconsistencies between Firefox and Chrome – and probably some other bugs.
Hehe. I was about 3 seconds from posing this before I saw your comment.
Because interact.js no longer calls
I'm closing this issue and leaving #77 - "Drag & Drop between frames" open.