Opened 9 years ago
Closed 9 years ago
#9993 closed bug (duplicate)
Using draggable of parent jquery from within iframe
Reported by: | daniel.platz | Owned by: | |
---|---|---|---|
Priority: | minor | Milestone: | none |
Component: | ui.draggable | Version: | 1.10.4 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
When accessing the jquery instance defined in a parent from within an iframe, the draggable plugin does not work for an element within an iframe. I.e. var $ = top.$;
$( "#draggable" , document ).draggable({...
does not work because jquery-ui internally uses calls to $(document) and registering mouse event listeners on the parent document but not on the iframe. Using $(this.element[0].ownerDocument) instead for the listeners solved the issue.
Note: See
TracTickets for help on using
tickets.
the link contains a self-contained example. for it to work locally, in chrome you have to start with --disable-web-security.