Hi,
I have drag drop enabled and it works fine if all items are within the bounds of the tree div (no vertical scrollbar). However if I add more items so that it can be vertically scrolled, and then scroll down below the first item I can no longer drop nodes onto other nodes (i.e. to make them children of the node). I can still drag and move a node (it shows the horizontal line for the position to move it to).
It looks as though the drag-drop is not accounting for the vertical scroll when actually scrolled. If I have heaps of items and the vertical scroll showing but am scrolled to the top of the list then drag-drop works perfectly. It’s only once I scroll down that it stops behaving properly.
I’ve tested in IE6 and 8 and it’s the same.
Here is the list of items I’m providing:
<?xml version="1.0" ?>
- <tree id="0">
<item text="New Folder" id="16" open="1" />
<item text="a" id="42" open="1" />
<item text="b" id="43" open="1" />
<item text="c" id="19" open="1" />
<item text="d" id="44" open="1" />
<item text="e" id="41" open="1" />
<item text="f" id="20" open="1" />
- <item text="g" id="40" open="1" child="1">
- <item text="j" id="47" open="1" child="1">
- <item text="k" id="48" open="1" child="1">
- <item text="l" id="49" open="1" child="1">
- <item text="m" id="50" open="1" child="1">
<item text="n" id="51" open="1" />
</item>
</item>
</item>
</item>
</item>
<item text="h" id="45" open="1" />
- <item text="o" id="52" open="1" child="1">
- <item text="p" id="53" open="1" child="1">
<item text="q" id="54" open="1" />
</item>
</item>
<item text="i" id="46" open="1" />
</tree>
This is what I do to enable drag-drop:
tree.enableDragAndDrop(true, true);
tree.setDragBehavior("complex");