Opened 14 years ago

Closed 14 years ago

Last modified 14 years ago

#5386 closed defect (wontfix)

Another bug in TreeV3 DnD for 0.4.3

Reported by: guest Owned by:
Priority: high Milestone:
Component: Dijit Version: 0.4.2rc1
Keywords: TreeV3 DnD destroyChildren Cc:
Blocked By: Blocking:


Consider the following test.

<!DOCTYPE HTML PUBLIC "-W3CDTD HTML 4.01EN" ""> <html> <head> <title>Test 2</title>

<script type="text/javascript">

var djConfig = {isDebug: true};

</script> <script type="text/javascript" src="js/dojo.js"></script> <script language="JavaScript?" type="text/javascript">

dojo.require("dojo.widget.TreeV3"); dojo.require("dojo.widget.TreeNodeV3"); dojo.require("dojo.widget.TreeSelectorV3"); dojo.hostenv.writeIncludes();

</script> <script type="text/javascript">

function init() {

var tree = dojo.widget.byId("filesystem"); var rootNode = dojo.widget.createWidget("TreeNodeV3",

{title: "Root", tree:tree.widgetId, isFolder:true});

var leve11node = dojo.widget.createWidget("TreeNodeV3",

{title: "Folder1", tree:tree.widgetId, isFolder:true});

rootNode.addChild(leve11node); tree.addChild(rootNode); rootNode.expand();


function expanded(message) {

node = message.source; if (node.filled) return; node.destroyChildren(); showFolders(node);


function showFolders(node, folders) {

for (var i=1; i<3; ++i) {

var child = dojo.widget.createWidget("TreeNodeV3",

{title: node.title + i, tree:node.tree.widgetId, isFolder:true});


} node.filled = true; node.expand();


dojo.addOnLoad(init); dojo.addOnLoad(function() {

dojo.event.topic.subscribe("filesystem/afterExpand", expanded);

}); </script> </head>

<body> <div dojoType="TreeBasicControllerV3" widgetId="controller"></div> <div dojoType="TreeDndControllerV3" controller="controller" widgetId="dndController"></div>

<div dojoType="TreeV3" widgetId="filesystem" DNDMode="onto" DNDAcceptTypes="filesystem" toggler="fade" sizeMin="20" sizeShare="20"

listeners="controller;dndController" expandLevel="2">

</div> </body> </html>

Initially we have root node with one level beneath. Node expansion adds another level with 2 nodes unless expanded node haв been expanded before (filled = true). But before expanding we destroy all subnodes (actually the test is a simplified version of building filesystem tree dynamically).

Now do the following:

  1. Expand Folder1.
  2. Drag Folder11 onto Folder12. Because expand() destroys all children including the one that has just been dragged, and then adds a sublevel we now have 2 subnodes Folder121 and Folder122. That is normal.
  3. Now try drag ANY node. In IE 7.0 you will see the following message:

DEBUG: [Error: Unspecified error.] when calling onMouseMove$joinpoint$method on [object Object] with arguments [object Object] FATAL exception raised: Unspecified error.

In Firefox no problems occur.

Change History (2)

comment:1 Changed 14 years ago by bill

Resolution: wontfix
Status: newclosed

Sorry, we aren't fixing bugs on the 0.4 branch anymore. Please upgrade to 1.0.

comment:2 Changed 14 years ago by (none)

Milestone: 0.4.4

Milestone 0.4.4 deleted

Note: See TracTickets for help on using tickets.