Results 1 to 2 of 2

Thread: Bad menu positionning when adding items

    You found a bug! We've classified it as EXTJS-27069 . We encourage you to continue the discussion and to find an acceptable workaround while we work on a permanent fix.
  1. #1
    Ext JS Premium Member
    Join Date
    Dec 2011
    Posts
    23

    Default Bad menu positionning when adding items

    Adding items to menu causes it to be badly re-positionned.

    Code:
    btn1 = Ext.create('Ext.button.Button', {
        text: 'Menu1',
        menu:{    
            items: [{
                text: 'regular item 1'
            },{
                text: 'regular item 2'
            },{
                text: 'regular item 3'
            }],
        }
    });
    
    btn2 = Ext.create('Ext.button.Button', {
        text: 'Menu2',
        listeners: {menushow: {fn: function(){ 
            this.menu.add(new Ext.menu.Item({text:"New item"}));
        }}},
        menu:{    
            items: [{
                text: 'regular item 1'
            },{
                text: 'regular item 2'
            },{
                text: 'regular item 3'
            }]
        }
    });
    
    
    win = Ext.create('Ext.window.Window', {
        title: 'Hello',
        height: 200,
        width: 400,
        layout: 'fit',
        dockedItems: {
            xtype: 'grid',
            border: false,
            columns: [{header: 'World'}],                 // One header just for show. There's no data,
            store: Ext.create('Ext.data.ArrayStore', {}) // A dummy empty data store
        }
    }).show();
    
    win.header.insert(0, btn1);
    win.header.insert(1, btn2);
    Menu1 is OK:
    ExtMenu1.png

    Menu2 is display below window's header and docked items:
    ExtMenu2.png

    Tested on http://docs.sencha.com/extjs/6.5.2/classic embedded fiddle and Ext JS 6.5.3.57 - Classic Triton : https://fiddle.sencha.com/#view/editor&fiddle/2h3p.

  2. #2
    Sencha - Support Team keckeroo's Avatar
    Join Date
    Mar 2008
    Location
    Winnipeg, Canada
    Posts
    388

    Default

    Thanks for the report! I have opened a bug in our bug tracker.

Similar Threads

  1. Stretch all menu itens - Sencha Architect 3.5 with Ext JS 4.0
    By osmarpetry in forum Sencha Architect 3.x: Q&A
    Replies: 2
    Last Post: 16 Mar 2016, 2:10 PM
  2. Replies: 3
    Last Post: 29 Mar 2013, 10:28 AM
  3. [OPEN] Adding Itens to Toolbar inside FormPanel error
    By Davi Baldin in forum Ext 2.x: Help & Discussion
    Replies: 13
    Last Post: 21 Dec 2010, 1:26 AM
  4. Ext.ux.plugins.CustomColumnMenu [Adding custom itens to grid columns headers]
    By BoogieMonster in forum Ext 2.x: User Extensions and Plugins
    Replies: 4
    Last Post: 11 Mar 2010, 7:15 AM
  5. Viewport: Menu itens default
    By yurimcluz in forum Ext 2.x: Help & Discussion
    Replies: 2
    Last Post: 18 Mar 2008, 1:00 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •