onBeforeContextMenu

fires before the context menu is called in the item area

boolean onBeforeContextMenu(string id,Event e,HTMLElement node);
idstringthe id of the clicked item
eEventa native event object
nodeHTMLElementthe target HTML element
booleanreturning false will block the event

Example

$$("list").attachEvent("onBeforeContextMenu", function(id, e, node){
     if (some_check(id)) 
          return false; // blocks the context menu
     else 
          return true;
});

Details

Returning false from the event handler will block further processing.

See also
Back to top
If you have not checked yet, be sure to visit site of our main product Webix easy javascript framework and page of javascript tree visualization product.