Opened 10 years ago

Closed 10 years ago

#10023 closed defect (fixed)

[PATCH][CLA] Tree: node is null error dropping near edge of Tree

Reported by: youngho Owned by: bill
Priority: high Milestone: 1.4
Component: Dijit Version: 1.3.2
Keywords: tree dnd Cc:
Blocked By: Blocking:

Description (last modified by bill)

In the tree dnd, if an item selected and dropped outside of any TreeNode but still within the Tree.domNode, then a "node is null" error occurs.

Attachments (1)

tree_dnd.patch (2.0 KB) - added by youngho 10 years ago.

Download all attachments as: .zip

Change History (4)

Changed 10 years ago by youngho

Attachment: tree_dnd.patch added

comment:1 Changed 10 years ago by bill

Milestone: tbd1.4
Owner: set to bill
Status: newassigned
Summary: [PATCH][CLA]node is null error[PATCH][CLA] Tree: node is null error dragging outside of TreeNode but inside Tree

Great, thanks for the patch, I'll check it out.

comment:2 Changed 10 years ago by bill

Description: modified (diff)
Summary: [PATCH][CLA] Tree: node is null error dragging outside of TreeNode but inside Tree[PATCH][CLA] Tree: node is null error dropping near edge of Tree

Seems like it's a bigger issue than just that one line change; for example, the drag avatar should be red when the mouse is over the Tree but not over a TreeNode.

The Tree code tries to be clever (ie, efficient) by only monitoring mousemove events when it needs to (which is when we allow drop-between, dragThreshold > 0). Otherwise it tries to limit calculations to when onmouseover/onmouseout events occur. But the code isn't quite working right.

comment:3 Changed 10 years ago by bill

Resolution: fixed
Status: assignedclosed

(In [20420]) Disallow drops on the edges of the Tree, when cursor is over the padding between the Tree.domNode and the TreeNodes?. Thanks to youngho for finding the problem and for the test case.

Since the Tree code needs to monitor onmousemove for the drop-between case, it's easier to just do it all the time.

Fixes #10023 !strict.

Note: See TracTickets for help on using tickets.