Skip to main content

Search and Top Navigation

#7270 closed bug (fixed)

Opened April 19, 2011 06:02PM UTC

Closed May 02, 2011 09:49PM UTC

Last modified September 06, 2012 02:45PM UTC

JQuery UI Draggable IFrameFix

Reported by: VIRGOFX Owned by:
Priority: minor Milestone: 1.8.13
Component: ui.draggable Version: 1.8.11
Keywords: Cc:
Blocked by: Blocking:
Description

The JQuery UI Draggable has a problem when using the options [iframeFix = true] where the options.distance is greater then 0.

The draggable is creating the iframefix containers when the draggable starts. If the distance is set to 0, the start is fired immediately upon mouse click. However, if distance is > 0, which is useful when a click event needs to be registered on the draggable, the iframefix containers are not applied until the mousemove event registers an appropriate distance. However, when dragging over iframes, this won't register the mousemove correctly and subsequently won't start the dragging.

The iframeFix containers need to be moved from [start of dragging] to [mouseCapture].

Here is a jsFiddle test case:

http://jsfiddle.net/VXbPE/

Note: When dragging the black resizer .. it may take 3-4 times before you notice it doesn't drag with the mouse. Once you release the mouse/and or move the resizer closer to it's original position (e.g. away from the iframes) it will [start] and set the iframefix containers.

Attachments (0)
Change History (7)

Changed April 19, 2011 06:27PM UTC by VIRGOFX comment:1

Updated test case:

http://jsfiddle.net/VXbPE/3/

Changed April 20, 2011 04:31PM UTC by rdworth comment:2

status: newopen

Changed May 02, 2011 09:49PM UTC by Scott González comment:3

resolution: → fixed
status: openclosed

Merge pull request #187 from virgofx/master.

Fix #7270 - Draggable iFrameFix

Changeset: 3d5d58d85437ae11688c0407200fd36bed7c9426

Changed May 02, 2011 09:49PM UTC by Mark Johnson comment:4

Draggable: Modified the iframe shims to load prior to dragging. Fixed #7270.

(cherry picked from commit b1c8a13a1669dca4c4bde97fe2cc8b76f661b432)

Changeset: 15b9e9d176a7796f1582ba5c0a7d06e4ad7cc8e9

Changed May 02, 2011 09:52PM UTC by scottgonzalez comment:5

milestone: 1.91.8.13

Changed September 06, 2012 02:32PM UTC by jscheel comment:6

This fix breaks click events on draggables that are in the same position as an iframe. Here is an example with instructions: http://jsfiddle.net/jscheel/MruUn/

Changed September 06, 2012 02:45PM UTC by scottgonzalez comment:7

You can apply a different z-index that works for your app: http://jsfiddle.net/MruUn/1/

We should probably move the styles related to the iframe fix into a stylesheet instead of hard-coding the styles.