1. #1
    Sencha User
    Join Date
    Oct 2012
    Posts
    2
    Vote Rating
    0
    fgravin is on a distinguished road

      0  

    Default Ext.Menu doesn't keep attached to the div which open it

    Ext.Menu doesn't keep attached to the div which open it


    Hi,

    I have some issues with Ext.menu.

    I have a Menu, without any Ext button or other menu to open it.
    If i click on a div, i use showAt() with the position of my div then it displays the menu.

    The problem is that if i scroll in the page (not in the menu), the page will scroll behind but the menu will stay at its position. It won't follow the div it "belongs to".

    Is there any way that i can keep my menu attached to the div under which it is shown ??

    the code:
    Code:
    ...
    this.curMenu = new Ext.menu.Menu({
                floating: true,
                resultsView: dv,
                showSeparator: false,
                cls: 'no-icon-menu',
                items: its,
            });
    var menuElt = Ext.get(Ext.DomQuery.selectNode('div.'+type+'Menu', node));
    menuElt.on('click', function(){
       this.curMenu.showAt([menuElt.getX(), menuElt.getY() + menuElt.getHeight()]);
    }, this);
    Thanks

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    35,677
    Vote Rating
    749
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    The reason is you are showing it at a certain XY not within the div. Not sure what would happen but you can try to renderTo to the div.
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

  3. #3
    Sencha User
    Join Date
    Oct 2012
    Posts
    2
    Vote Rating
    0
    fgravin is on a distinguished road

      0  

    Default


    A solution could be to replace the menu manually.
    But i can't find how to get the heigth that have been scrolled on a scroll event

    Code:
    this.ownerCt.ownerCt.body.on('scroll', function(e,t,o){
    		            		alert(e.getWheelDelta());
    		            	});
    always display 0

Thread Participants: 1

Tags for this Thread

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar