Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drag and Drop in another iframe #187

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

TheGr8Nik
Copy link

When the drag and drop is made in another iframe, like the children iframe, the jQuery UI draggable widget add the mousemove and mouseup listener on the document element of the page.
Dispatching the event to the dragging element that is in the iframe is not enought to make the event to reach the parent document,
the event remain in the iframe. So I have added the dispatch of the event to the document too.

When the drag and drop is made in another iframe, like the children iframe, the jQuery UI draggable widget add the mousemove and mouseup listener on the document element of the page.
Dispatching the event to the dragging element that is in the iframe is not enought to make the event to reach the parent document,
the event remain in the iframe. So I have added the dispatch of the event to the document too.
When dispatch the event to the parent document of the iframe it calculates the offset of the iframe and add this values to the position of the simulated mouse event.
@kamelkev
Copy link

Does this patch actually work? I created a contrived example, and while I see the issue you are dealing with, I do not see the issue resolved by your proposal?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants