PDA

View Full Version : [CLOSED-540][DUP] TreeNode insertBefore bug



vladsch
12 Feb 2010, 5:56 AM
Hi,

insertBefore method works incorrectly
Example: http://www.extjs.com/deploy/dev/examples/tree/reorder.html

1. Open example
2. Open Firebug console and executes the following code
3. Notice visualy in the tree that second node (dd) is lat but should be first (alert says about it)



function move()
{
var root = Ext.getCmp('ext-comp-1001').getRootNode();
var firstNode = root.childNodes[0];
var secondNode = root.childNodes[1];
root.insertBefore(secondNode, firstNode);
alert(firstNode.text + ' is first node: ' + firstNode.isFirst());
alert('First node is ' + root.childNodes[0].text);
}
move();

Jamie Avins
12 Feb 2010, 9:17 AM
Duplicate of issue #540:

http://www.extjs.com/forum/showthread.php?t=91506