Draggable: cannot drag element inside iframe
|Reported by:||bgrins||Owned by:|
|Keywords:||iframe, draggable, mouse||Cc:|
I wanted to drag an element inside iframe, but be able to instantiate that from the parent document. Something like: $("iframe#test").contents().find("#draggable").draggable();
This used to throw errors and not work, but I was able to fix it pretty easily by updating calls from "document" to "ownerDocument" inside mouse.js, core.js, and draggable.js.
This change should not break existing code, since the ownerDocument of the element will just be "document" in a traditional situation (as far as I know).
Please see the test case, which was taken out of the development bundle /demos/ folder (copy the two html files into the folder and run it to see the problem).
If you do not feel this minor fix is necessary, that is fine - but it would make my ability to upgrade UI versions much easier (not having to manually patch the files every time), and may help someone else who is having this problem.