@aleemb: I don't believe that is what he's talking about. I believe the problem to be the Iframe and not the combination of the draggable and resizable.
@regex: I have this same issue and it also manifested itself with a prior implementation using the prototype toolkit.
My implementation uses an Iframe as a canvas on which to drop draggables. The way you can see the bug is to move your mouse too fast so that the cursor leaves the edge of the draggable DIV. The DIV stops moving and your mouse keeps going; by moving your mouse back to the surface of the DIV, it picks up the DIV again and starts moving even if you've released the click on your mouse.
My suspicion is that the Iframe events somehow interfere with the jquery events.
My solution was to position a transparent DIV tag between the Iframe and the draggables/resizables.
In this manner, the iframe never sees the mouse movement and as such doesn't interfere.
EDIT: See code sample: http://dpaste.com/hold/17009/
Wes
UPDATE! I revisited this issue and the iframeFix seems to work great in all browsers for the draggables, but the resizables do not have the equivalent fix.
I used this code to manually add a mask DIV:
$elements.resizable({ //mark it as resizable
containment: "#docCanvas",
start: function(event, ui) {
//add a mask over the Iframe to prevent IE from stealing mouse events
$j("#docCanvas").append("<div id="mask" style="background-image:url(images/spacer.gif); position: absolute; z-index: 2; left: 0pt; top: 0pt; right: 0pt; bottom: 0pt;"></div>");
},
stop: function(event, ui) {
//remove mask when dragging ends
$j("#mask").remove();
}
});
And the HTML:
<div id="docCanvas" style="position: relative;">
<iframe src="something.html"></iframe>
</div>
spacer.gif is a 1x1 pixel transparent gif.
This fixes the issue for IE7 & IE8. IE6 has trouble with z-index and can't seem to figure out that the DIV should be between the IFrame and the resizable DIV. I gave up on IE6.
Wes
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…