You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the example demonstrated above, I am trying to move Node 2 along with it's children to targetTree. The move runs into a call to _adoptNode() with undefined node.
Upon debugging I realized that this is happening during the move of child nodes. In the first pass when Node 2.1 (index 0) is removed from the tree for Node 2, the underlying children array gets modified and the indexes become invalid. So the second pass doesn't find anything present at the expected position (index 1):
I saw a comment in the same file's insertNode() function talking about something similar, but that doesn't convince me as in that case the functionality doesn't accomplish its goal.
Thanks!
Ashish
The text was updated successfully, but these errors were encountered:
Thanks for the report and the test case! I'll look into this soon.
In the meantime, a simple workaround for this would probably be to just manually remove Node 2 from its original tree before adding it to the targetTree.
A simple case can be found at: http://jsfiddle.net/ashishmarwal/42Sxu/
In the example demonstrated above, I am trying to move
Node 2
along with it's children totargetTree
. The move runs into a call to_adoptNode()
withundefined
node.Upon debugging I realized that this is happening during the move of child nodes. In the first pass when
Node 2.1
(index 0
) is removed from the tree forNode 2
, the underlyingchildren
array gets modified and the indexes become invalid. So the second pass doesn't find anything present at the expected position (index 1
):I saw a comment in the same file's
insertNode()
function talking about something similar, but that doesn't convince me as in that case the functionality doesn't accomplish its goal.Thanks!
Ashish
The text was updated successfully, but these errors were encountered: