I found a bug where if you select the tree root and a bunch of nodes and then try to click one of them - the selection doesn't change. This is very apparent if you select all of the nodes including root and can't get back to single selection (unless you start ctrl-clicking to deselect first).

The actual bug seems to be related to selecting a non-draggable node(ie the root node, which is causing onBeforeDrag to return false.) Dragging the root node is going to cause bugs anyway.

I think even with your fix, so long as the root node (or any other non-draggable node) is selected, you still can't drag anything. Disabled nodes have the same problems, altho they shouldn't be able to be selected anyway.

The obvious fixes are:

Hide the root, making it unselectable.

Make all undraggable nodes unselectable by changing selectNode.

Filter the selected nodes to remove undraggable ones, and drag the rest.

The way the selection and drag work here is basically the wrong way to do it. The right way involves detecting mousedown/up events before the DD (drag/drop) code does (This happens in v4.2 at least). However that's not feasible with the ExtJS 3.x tree as far as I can determine.

Sorry the reply has taken so long, apparently I don't get the emails anymore.

Quote:

Originally Posted by adam.jimenez

This extension is excellent, thank you.

I found a bug where if you select the tree root and a bunch of nodes and then try to click one of them - the selection doesn't change. This is very apparent if you select all of the nodes including root and can't get back to single selection (unless you start ctrl-clicking to deselect first).

24 Jul 2013, 1:39 AM

gm.marwah@gmail.com

Does this solution works for ExtJS 4.1

Hi DeadMeat,
Does this solution works for ExtJS 4.1. As most of the classes and ux package seems to be out of date. Did you happen to upgrade the solution to 4.1, can you share with us ?

Thanks

25 Jul 2013, 6:48 AM

Deadmeat

Quote:

Originally Posted by gm.marwah@gmail.com

Hi DeadMeat,
Does this solution works for ExtJS 4.1. As most of the classes and ux package seems to be out of date. Did you happen to upgrade the solution to 4.1, can you share with us ?

Thanks

This code isn't ported to ExtJS 4.x and isn't necessary either, since the default tree supports the main feature, and has several additional advantages besides.

4.1 has its own bugs, which aren't high on Sencha's priorities, but there is several examples out there on how to avoid/fix them.