Context Menu can't use dynamic created div as zone


var div = document.createElement("DIV"); var myContextMenu = new dhtmlXMenuObject({ parent: div });

above code will error, because dhtmlXMenuObject.prototype.addContextZone will call document.getElementById(zoneId), but this will get null, because div doesn’t append to to document.

Unfortunately the only solution is to append your container to DOM before init the context menu.

This will be fixed in the next update, addContextZone will support both id and item object

i see, thanks!

though addContextZone support item object
but removeContextZone still doesn’t support item object.