1. #1
    Ext JS Premium Member zodeus's Avatar
    Join Date
    Jan 2010
    Location
    Vancouver Canada
    Posts
    36
    Vote Rating
    0
    zodeus is on a distinguished road

      0  

    Default [4.1 B3] Error when calling hide on nested elements

    [4.1 B3] Error when calling hide on nested elements


    I have the following code which fetches a list of button objects and attempts to hide them if the criteria is correct.
    Code:
    var items = me.getComponentMenu().query('button[nodeId]');
    Ext.Array.forEach(items, function (i) {
        if (!store.getById(i.nodeId)) {
            i.disable();
            i.hide();
        }
    });
    me.getComponentMenu().show();

    In, Ext 4.0.7 this works fine, however in 4.1b1,2,3 iI receive the following error.

    Uncaught TypeError: Cannot read property 'dom' of null

    The problem seems to be in the Ext.layout.container.Table::isValidParent

    Code:
    isValidParent: function (item, target, rowIdx, cellIdx) {
        var tbody, correctCell, table;
        if (arguments.length === 3) {
            table = item.el.up('table').dom;
            Uncaught
            TypeError: Cannot
            read
            property
            'dom'
            of
            null
            return table && table.parentNode === target.dom;
        }
        tbody = this.owner.getTargetEl().child('table', true).tBodies[0];
        correctCell = tbody.rows[rowIdx].cells[cellIdx];
        return target.dom === correctCell;
    }
    The disable call works, and does disable the button, however hide breaks.

    I would have provided a proper test case however I cannot reproduce it in a simplified test, so I'm assuming it's some sort of nesting issue. I've seen this in a couple of other areas in my system as well.

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    36,756
    Vote Rating
    828
    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


    Table layout seems to have it's fair share of bugs currently. I would love to see a test case to reproduce this if at all possible in a 2nd try.
    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.

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