Wait! Looks like we don't have enough information to add this to bug database. Please follow this template bug format.
  1. #1
    Sencha Premium Member
    Join Date
    May 2012
    Posts
    63
    Vote Rating
    1
    stevanicus is on a distinguished road

      0  

    Default Tree navigation - me.dom.parentNode is undefined

    Tree navigation - me.dom.parentNode is undefined


    Ext version tested:
    • Ext 4.1.1-rc1
    Browser versions tested against:
    • FF13
    Description:
    • This is a very difficult one to reproduce... but it only occurs when adding many nodes and child nodes at once
    • The error also only appears depending on the size of tree - a big tree didnt create this error - only a smaller one as in the next step of this post
    Steps to reproduce the problem:
    • Create a tree and add the following structure at once from an array - not on button click or so
    • Node 1
      • Node 1.1
        • Node 1.2
    • Node 2
      • Node 2.1
        • Node 2.2
    • -- continue until 5.2
    The result that was expected:
    • Tree is displayed correctly
    The result that occurs instead:
    • cashes with 'me.dom.parentNode is undefined'
    I had found a temporary solution using
    Code:
    parentNode.insertChild(parentNode.childNodes.length, childNode );
    instead of that
    Code:
    parentNode.appendChild(childNode);
    or vice versa... however that stopped working in the end for me.

    My final fix is to alter the ExtJS Lib:

    Under
    Code:
    Ext.dom.AbstractElement.addMethods({
    for function
    Code:
    insertSibling: function(el, where, returnDom){
    change
    Code:
    if(el.nodeType || el.dom){
                    rt = me.dom.parentNode.insertBefore(Ext.getDom(el), isAfter ? me.dom.nextSibling : 
                    if (!returnDom) {
                        rt = Ext.get(rt);
                    }
                }            
            }
    to
    Code:
    if(el.nodeType || el.dom){
                if(me.dom.parentNode){
                    rt = me.dom.parentNode.insertBefore(Ext.getDom(el), isAfter ? me.dom.nextSibling : me.dom);
                    if (!returnDom) {
                        rt = Ext.get(rt);
                    }
                }            
            }

  2. #2
    Sencha - Ext JS Dev Team evant's Avatar
    Join Date
    Apr 2007
    Location
    Sydney, Australia
    Posts
    16,797
    Vote Rating
    602
    evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute

      0  

    Default


    Impossible to tell without a test case, I'd say the problem, whether yours or ours, lies elsewhere, not in that core code.
    Evan Trimboli
    Sencha Developer
    Twitter - @evantrimboli
    Don't be afraid of the source code!

  3. #3
    Sencha Premium Member
    Join Date
    May 2012
    Posts
    63
    Vote Rating
    1
    stevanicus is on a distinguished road

      0  

    Default


    thanks for your reply - I will try and get a test case on here as soon as possible. However it only happens when i'm inserting a child node. Linear is fine... and if I add the if() statement in the core code, everything works just as it should.

    my insert function

    Code:
    var parentNode = this.getANodeByID(parentID);
            if(parentNode){
                var childNode = this.getANodeByID(childID);
                if(childNode){
                    //parentNode.insertChild(parentNode.childNodes.length, childNode );
                    //parentNode.appendChild(childNode);
                }
            }

    my getANodeByID function

    Code:
    getANodeByID: function(itemID){
            return this.getNavigatorTree().getStore().getNodeById("nav_" + itemID);
        },

Thread Participants: 1

Tags for this Thread

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