Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Saurabh Malviya on Jul 08, 2009 00:35
open dhtmlx forum
Native context menu not getting blocked

Below provided patch works fine for Ie & Mozilla but it doesn't support Safari

dhtmlxEvent(libTableGrid.entBox,"contextmenu",function(e){
     (e||event).cancelBubble = true
     return false;
})

Please provide the solution for Safrai as well.

Answer posted by Support on Jul 08, 2009 02:17
Change your code as


dhtmlxEvent(mygrid.entBox,"contextmenu",function(e){
     var e = e||event;
     e.cancelBubble = true
     if (e.preventDefault) e.preventDefault();
     return false; 
})