Opened 12 years ago

Closed 12 years ago

Last modified 11 years ago

#7270 closed bug (fixed)

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.

Change History (7)

comment:1 Changed 12 years ago by VIRGOFX

Updated test case: http://jsfiddle.net/VXbPE/3/

comment:2 Changed 12 years ago by rdworth

Status: newopen

comment:3 Changed 12 years ago by Scott González

Resolution: fixed
Status: openclosed

Merge pull request #187 from virgofx/master.

Fix #7270 - Draggable iFrameFix

Changeset: 3d5d58d85437ae11688c0407200fd36bed7c9426

comment:4 Changed 12 years ago by Mark Johnson

Draggable: Modified the iframe shims to load prior to dragging. Fixed #7270. (cherry picked from commit b1c8a13a1669dca4c4bde97fe2cc8b76f661b432)

Changeset: 15b9e9d176a7796f1582ba5c0a7d06e4ad7cc8e9

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

Milestone: 1.91.8.13

comment:6 Changed 11 years ago by jscheel

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/

comment:7 Changed 11 years ago by Scott González

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.

Note: See TracTickets for help on using tickets.