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 javascript ui components library and page of html5 context menu product.