Opened 5 years ago

Closed 5 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.

https://db.tt/dYnK7M22

Change History (2)

comment:1 Changed 5 years ago by daniel.platz

the link contains a self-contained example. for it to work locally, in chrome you have to start with --disable-web-security.

comment:2 Changed 5 years ago by Scott González

Resolution: duplicate
Status: newclosed

Duplicate of #5727.

Note: See TracTickets for help on using tickets.