Show Contextmenu

I have code:

var menu = new dhtmlXMenuObject({ parent:"settingsMenu123", image_path:"codebase/imgs/", context: true, auto_hide: false, auto_open: false, items:[ {id:"t1", text:"Top 1", items:[ {id:"ch1", text:"child 1"}, {id:"ch2", text:"child 2"} ]} ] });

And trying to show contex menu with left click:

settingsBtn.on('click','.portletHeaderSettingsButton',function(e) {
    console.log(menu,e.clientX,e.clientY); // Just check if reall I get all data where needed.
    menu.showContextMenu(e.clientX,e.clientY); // Try to show contextMenu
});

But nothing not show up, contextMenu it’s showing only then I click right mouse button.

How can I do that, after clicking left mouse button it will show context menu?

Hi

Could you please provide us complete demo including all correspondnig js/css files?
Please also add information regarding current and expected behaviour.

Here is a small guide how to make a complete demo:
docs.dhtmlx.com/tutorials__auxil … pport.html

If you don’t want to share your demo here for any reasons - you can send it to support@dhtmlx.com, if so - please include link to this forum topic.

If you’re using PRO Edition please send your demo to support@dhtmlx.com