YUILibrary - Open source JavaScript and CSS for building richly interactive software.
Fork YUI on GitHub

YUI 2.x

Ticket #2528149 (closed defect)

Reporter


James Bunt
Opened: 08/6/09
Last modified: 09/29/09
Status: closed
Type: defect
Resolution: fixed

Owner


Dav Glass
Target Release: 3.0.0 GA
Priority: P3 (normal)
Summary: intersect drag mode doesn't behave as expected with stickX/stickY
Description:

When using DDConstrained to stickX or stickY I've found that the 'intersect' dragMode doesn't behave as expected. The cursor has to be within the shim of the drop target for the drop:over event to
fire even if the dragged node is intersecting with it.

Type: defect Observed in Version: 3.0.0 Beta1
Component: DragDrop Severity: S3 (normal)
Assigned To: Dav Glass Target Release: 3.0.0 GA
Location: Library Code Priority: P3 (normal)
Tags: Relates To:
Browsers: Firefox 3.x - Mac
URL:
Test Information:

This can be reproduced by modifying the 'Drop Based Coding' example (http://developer.yahoo.com/yui/3/examples/dd/drop-code.html) as follows:

  • Change #drop style of 'right: 5px' to 'left: 5px'
  • Add 'dd-constrain' to the use list
  • Change dd declaration to:

<code>
var dd = new Y.DD.Drag({
node: v,
dragMode: 'intersect',
data: thisData
}).plug(Y.Plugin.DDConstrained, {
constrain2node: '#play',
stickY: true
});
</code>

Drag one of the nodes down to intersect over the drop box but keep your mouse cursor far out to the right (use _debugShim to ensure the cursor is outside of the drop's shim). The dragged node will
intersect the drop box without the drop changing color. If you then bring your mouse cursor inside the drop's shim, it changes color.

Change History

Dav Glass

YUI Developer

Posted: 08/6/09
  • location changed to Library Code
  • milestone changed to 3.0.0 GA
  • priority changed to P3 (normal)
  • status changed from new to accepted

Dav Glass

YUI Developer

Posted: 08/6/09
  • resolution changed to fixed
  • status changed from accepted to checkedin

Fixes #2528149 - Fixed _noShim use case, now this bug works as expected when you turn off the drop shim
View Commit: 1967ce22f0b0c1c7b3b0e58284e1f80bf6d88583

George

YUI Developer

Posted: 09/29/09
  • status changed from checkedin to closed