diff --git a/src/jsmind.mind.js b/src/jsmind.mind.js index 02f4a6e2..bb01e2dc 100644 --- a/src/jsmind.mind.js +++ b/src/jsmind.mind.js @@ -181,8 +181,10 @@ export class Mind { break; } } + let origin_parent = node.parent; node.parent = parent_node; parent_node.children.push(node); + this._update_index(origin_parent); } if (node.parent.isroot) {