Insert a new child when a node is in edit mode

I am using dhtmlxTree (v.3.0 build 110707) with automatic dataProcesser. When a node is in edit mode (after double click), no matter the text changed or not, the insertNewChild call creates a child node on the page. But after that I always get the following error when click on any node:

The next error ocured :
Uncaught TypeError: Cannot read property ‘childNodes’ of null in …/jslib/js/dhtmlx/dhtmlxTree/codebase/ext/dhtmlxtree_ed.js at line 10

What could I do to solve this?

Thanks!

Please, make and attach completed demo to reproduce your issue:
docs.dhtmlx.com/doku.php?id=othe … leted_demo

I actually found the similar issue on your online sample:

dhtmlx.com/docs/products/dht … data.html#

The following steps will lead to the childNode error:

  1. Click the link “Add node as child of selected (or top)”
  2. Click the newly created “New item” node
  3. Click the link “Add node next to selected”
  4. Double click the 2nd node “New item”
  5. Click the link “Delete selected row”
  6. Click the 1st node “New Item”. Then the following javascritp error popup:
    Line: 10
    Error: ‘this._editCell.span.childNodes’ is null or not an object

Thanks!

Just changed the subject for the above scenario:

Re: delete a node in edit mode

We managed to reproduce the issue. Please, tell us the version of a tree you use?

Just want to add one little approach: you can stop edit before deleting item:

tree.stopEdit(); tree.deleteItem(...);

The dhtmlxTree version is: v.3.0 build 110707.

Thanks!

Download fixed version:
dhtmlxtree.zip (25.4 KB)