Skip to main content

Search and Top Navigation

#9993 closed bug (duplicate)

Opened April 24, 2014 10:41AM UTC

Closed April 24, 2014 12:02PM UTC

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

Attachments (0)
Change History (2)

Changed April 24, 2014 10:51AM UTC by daniel.platz comment:1

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

Changed April 24, 2014 12:02PM UTC by scottgonzalez comment:2

resolution: → duplicate
status: newclosed

Duplicate of #5727.