this._doOnClick = function(id, type, casState) {
......
//
if (this.checkEvent("onClick")) {
this.callEvent("onClick", [id, this.conf.ctx_zoneid, casState]);
} else {
if ((type.charAt(1) == "d") || (this.conf.mode == "win" && type.charAt(2) == "t")) return;
}
if (this.conf.context && this._isContextMenuVisible() && this.conf.ctx_autohide) {
this._hideContextMenu();
} else {
// if menu unloaded from click event
if (this._clearAndHide) this._clearAndHide();
}
}
in above code, if a menu item is to close the window, then after this.callEvent(“onClick”…), the dhtmlxmenu will be destructor and unload, then this.conf will be null, and call this.conf.context will error.
Unfortunately the problem cannot be reconstructed locally.
Could you please, provide a complete demo, where it can be reproduced.
Here you can find a tutorial about creating a complete demo: docs.dhtmlx.com/tutorials__auxi … pport.html