Error in showLightbox

Hi,

After adding a new task to my code I got the values for a previous lightbox and also an exception

Uncaught TypeError: Cannot read property 'nextSibling' of null dhtmlxgantt.js:5952 gantt._set_lightbox_values dhtmlxgantt.js:5952 gantt._fill_lightbox dhtmlxgantt.js:5964 gantt.showLightbox dhtmlxgantt.js:5617 (anonymous function) dhtmlxgantt.js:1632 (anonymous function) dhtmlxgantt.js:1344 gantt._find_ev_handler dhtmlxgantt.js:1425 gantt._on_click

Steps to reproduce with the attached file are:
1.-Load the page
2.-Click button on Project #1, to create a task at level 1, for example G2
3.-Click button on G2 to create another task inside G2, for example T1 and select any element from the combo box.
4.-Click the Capacity chart button.
5.-Gantt will be reloaded.

In the popup window the values are already populated from the previous execution and when clicking in the Save button the exception is generated.

HTH

Tested with Chrome.
index.zip (2.16 KB)

Hi,
The problem seems to be caused by the incorrect state of the lightbox after re-initialization of the gantt chart. We’ll add fix to a dev version, so it will be included in the next update.
For now you may add ‘gantt.resetLightbox’ before ‘gantt.init’.gantt.resetLightbox(); gantt.init("gantt_here");
Another approach would be to move gantt.init out of loadGantt function, so it will be initialized only once:gantt.init("gantt_here"); load_gantt = function(){

Thank you for the detailed reports, and sorry for the inconveniences!

Worked!!! Thanks.