1. #1
    Ext User YargicX's Avatar
    Join Date
    Mar 2008
    Location
    Istanbul, Turkiye
    Posts
    89
    Vote Rating
    0
    YargicX is on a distinguished road

      0  

    Default Document Context Menu

    Document Context Menu


    Hi,
    I show a context menu for grid. But document's context menu appears after grid context menu. I've tried to cancel event bubble but it don't work. What can i do ?
    Code:
    function grid_rowcontextmenu(grid, rowIndex, e){
    	var xy = e.getXY();
    	grid.contextMenu=conMenu;
    
    	document.oncontextmenu = function(){return false;};
    	grid.contextMenu.showAt(xy);
    	event.cancelBubble=true;
    	document.oncontextmenu = null;
    }
    I S T A N B U L

  2. #2
    Sencha - Ext JS Dev Team evant's Avatar
    Join Date
    Apr 2007
    Location
    Sydney, Australia
    Posts
    16,990
    Vote Rating
    649
    evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute

      0  

    Default


    Code:
    function grid_rowcontextmenu(grid, rowIndex, e){
       e.stopEvent();
       //whatever
    }

  3. #3
    Ext User YargicX's Avatar
    Join Date
    Mar 2008
    Location
    Istanbul, Turkiye
    Posts
    89
    Vote Rating
    0
    YargicX is on a distinguished road

      0  

    Default


    it's worked. thanks alot.
    I S T A N B U L

  4. #4
    Sencha User
    Join Date
    Apr 2008
    Posts
    141
    Vote Rating
    0
    armandoxxx is on a distinguished road

      0  

    Default


    Thanks saved my ass too.. been searching for this for 2 hours

Thread Participants: 2