The following test was done using this sample: https://docs.dhtmlx.com/gantt/samples/01_initialization/16_projects_and_milestones.html
(I could only put one image in this post, so instead of breaking it up I have referred to it by a figure number).
If you open a light box for the first time, it creates an element in the DOM: See Figure A.
This same DOM element is used every time the lightbox is re-opened; until a different lightbox type is needed (Project, Task, Milestone, etc.): See Figure B.
If you then open a lightbox for a type that has already had it’s lightbox created- a new DOM element is then created instead of re-using the already created one: See: Figure C
This pollutes the DOM with unused lightbox elements throughout the use of the Gantt Chart.
Instead, the old element should be re-used.
Also, running the command window.gantt.resetLightbox()
will only remove the most-recently created one from the DOM; all others are still left there.