PDA

View Full Version : [FIXED][2.x/3.x] Issue with Tree Panel



subinjose
19 Jun 2009, 6:57 PM
I found this issue with version 2.2 with Firefox browser and IE browser.

In some particular scenario, the tree structure seems to be broken.

I have attached a sample code to explain the issue. Unzip the attached file and open "TestExtTree" folder. Inside this folder , there is an html file named "test.html". Open it with either IE or FF.

Steps to produce the issue are thre on this page

And I found it working when I modified the code at line number 23651 on ext-all-debug.js to "this.node.renderIndent(true,true);"

Is this a right solution???

Thanks

Condor
21 Jun 2009, 10:34 PM
A reference to a linenumber in an older Ext version isn't very useful.

The OP is suggesting the following change:

Ext.override(Ext.tree.TreeNodeUI, {
onMove : function(tree, node, oldParent, newParent, index, refNode){
this.childIndent = null;
if(this.rendered){
var targetNode = newParent.ui.getContainer();
if(!targetNode){
this.holder = document.createElement("div");
this.holder.appendChild(this.wrap);
return;
}
var insertBefore = refNode ? refNode.ui.getEl() : null;
if(insertBefore){
targetNode.insertBefore(this.wrap, insertBefore);
}else{
targetNode.appendChild(this.wrap);
}
this.node.renderIndent(true, true);
}
}
});

The change seems correct and applies to both the Ext2 branch and the Ext3 trunk.

mystix
21 Jun 2009, 10:52 PM
[ move to 3.x Bugs from 2.x Bugs ]

evant
21 Jun 2009, 11:19 PM
Fix works, though I don't think we need to refresh it in all cases (say, if the old and new parent is the same). Fixed in SVN.