1. #1
    Sencha User SlashEMc2k's Avatar
    Join Date
    Jul 2007
    Posts
    84
    Vote Rating
    0
    SlashEMc2k is on a distinguished road

      0  

    Default on Viewport only show context menu?

    on Viewport only show context menu?


    I`m having problems setting up a context menu on the Ext.Viewport.
    When I use the code below, the context menu appears even if I right click on an Ext.Window

    Is this down to the scope on the onclick?
    Or do I need to setup a condition in the onContextMenu function, if viewport clicked then show context menu?


    Code:
    var bgBody = new Ext.Viewport({
    	id:'bgBody',
    	margins: '5 5 5 0',
    	layout:'fit',
    	items: iconDisplay
    });
    			
    //set on right click show context menu
    Ext.getCmp('bgBody').getEl().on('contextmenu', onContextMenu);
    //Ext.getBody().on('contextmenu', onContextMenu);
    
    function onContextMenu(e, target) {
    	e.preventDefault();
    	messageContextMenu.showAt(e.getXY());
    }

  2. #2
    Sencha - Ext JS Dev Team Animal's Avatar
    Join Date
    Mar 2007
    Location
    Notts/Redwood City
    Posts
    30,499
    Vote Rating
    47
    Animal has a spectacular aura about Animal has a spectacular aura about

      0  

    Default


    The viewport encapsulates the document body, so all right clicks bubble up to it.

    You will have to use the Viewport's body

  3. #3
    Sencha User SlashEMc2k's Avatar
    Join Date
    Jul 2007
    Posts
    84
    Vote Rating
    0
    SlashEMc2k is on a distinguished road

      0  

    Default


    Thanks Animal,

    I've been reading through the API and I`m not sure how to get the viewports body?

    Do I just need to grab the first child of the body, as I can't reference it by its id as this is automatically generated?

Thread Participants: 1

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi