tree and context menu

I’m trying to use the context menu with a tree.

Tree creates OK, have d-n-d working, etc.

Adding context menu as follows:


var ctxtMenu = new dhtmlXContextMenuObject(‘120’,0,"…path-to-imgs");

var item = new dhtmlXMenuItemObject(“ctxtInsert”,“Insert”,"","",“contextMenu”);,item);

item = new dhtmlXMenuItemObject(“ctxtDelete”,“Delete”,"","",“contextMenu”);,item);









On right-click the menu appears, but behind the tree node text. Then I can’t click a menu item because the click goes to the tree instead.

Have I done something wrong? How do I get the menu on top?


Most probably the issue caused by used z-indexes. If you are initialized tree in some kind of absolute positioned HTML container it possible that it have z-index greater than one of context menu.
To resolve problem you can add next command to context menu initialization.

    var ctxtMenu = new dhtmlXContextMenuObject(‘120’,0,"…path-to-imgs");; // or some other big value