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?