Results 1 to 4 of 4

Thread: Handler doesn't work in the button menu if table layout is given for the menu.

    You found a bug! We've classified it as EXTJS-17486 . We encourage you to continue the discussion and to find an acceptable workaround while we work on a permanent fix.
  1. #1

    Default Handler doesn't work in the button menu if table layout is given for the menu.

    When I use table layout config in the menu, handler doesn't work for the menu items. If I remove table layout config, everything works fine.

    I have tried with other layouts and it works fine with the other layouts as well.
    Code:
    Ext.create('Ext.Button', {
        text: 'Click me',
        renderTo: Ext.getBody(),
        text: 'hello',
        menuAlign: 't-b',
        menu: {
            layout: {
                type:'table',
                columns: 1
            },
            items: [{
                text: 'My Profile'
            }, {
                text: 'Logout',
                itemId: 'logout',
                handler: function() {
                    alert("hello");
                }
            }]
        }
    });

  2. #2
    Sencha Premium User evant's Avatar
    Join Date
    Apr 2007
    Location
    Sydney, Australia
    Posts
    19,256

    Default

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

  3. #3
    Sencha User
    Join Date
    May 2007
    Posts
    4

    Default I have the same error with Ext 6

    Quote Originally Posted by evant View Post
    Thanks for the report! I have opened a bug in our bug tracker.
    SameError

  4. #4
    Sencha User
    Join Date
    Jun 2010
    Location
    vancouver, bc, canada
    Posts
    2

    Default

    override you menu getItemFromEvent function

    Code:
    getItemFromEvent: function (e) {
      var me = this,
          toEl = e.getTarget();
    
      while (!Ext.get(toEl).hasCls("x-menu-item")) {
        toEl = toEl.parentNode;
        if (!toEl) {
          return;
        }
      }
      return Ext.getCmp(toEl.id);
    }

Similar Threads

  1. Replies: 11
    Last Post: 12 Jul 2015, 2:15 AM
  2. [FIXED] Button Menu: Selection in submenu doesn't close primary menu
    By lmastrodicasa in forum Ext 5: Bugs
    Replies: 1
    Last Post: 26 Nov 2014, 9:53 AM
  3. Replies: 1
    Last Post: 8 Aug 2012, 8:08 AM
  4. Replies: 1
    Last Post: 26 Feb 2010, 2:06 PM
  5. Mouse click does not work on menu items(when menu is rendered as context menu)
    By anilcs0405 in forum Ext 3.x: Help & Discussion
    Replies: 4
    Last Post: 3 Aug 2009, 5:55 AM

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
  •