Threaded View

    Success! Looks like we've fixed this one. According to our records the fix was applied for EXTJS-6528 in a recent build.
  1. #1
    Sencha User
    Join Date
    Jun 2009
    Posts
    102
    Vote Rating
    6
    campersau1 is on a distinguished road

      0  

    Default Ext JS 4.1.1 RC2 - Ext.layout.container.BoxOverflow.Menu.destroy throws Exception

    Ext JS 4.1.1 RC2 - Ext.layout.container.BoxOverflow.Menu.destroy throws Exception


    Ext.layout.container.BoxOverflow.Menu.destroy Method throws Exception because me.menuTrigger is undefined.

    The Exception: Uncaught TypeError: Cannot call method 'getItemId' of undefined

    Here is the call Stack:

    trigger is undefined
    menu.jpgAbstractMixedCollection.jpggetComponentId.jpg


    FIX:
    Code:
        destroy: function() {
            var trigger = this.menuTrigger; // <-- menuTrigger can be undefined
    
            if (trigger && !this.layout.owner.items.contains(trigger)) { // fix for this bug
                // Ensure we delete the ownerCt if it's not in the items
                // so we don't get spurious container remove warnings.
                delete trigger.ownerCt;
            }
            Ext.destroy(this.menu, trigger);
        }



    The destroy Method of Ext.layout.container.BoxOverflow.Menu.destroy in Ext 4.1.1 RC1 looked a bit simpler:
    Code:
        destroy: function() {
            Ext.destroy(this.menu, this.menuTrigger);
        }
    Sadly I have no test case at the moment...
    Last edited by campersau1; 14 Jun 2012 at 1:41 AM. Reason: Added possible fix

Thread Participants: 1