You found a bug! We've classified it as EXTJSIV-8289 . We encourage you to continue the discussion and to find an acceptable workaround while we work on a permanent fix.
  1. #1
    Sencha Premium Member
    Join Date
    Jan 2010
    Location
    Vancouver, Canada
    Posts
    115
    Vote Rating
    8
    bogc will become famous soon enough

      0  

    Default Buffered rendered TreePanel setRootNode fails when the tree has been scrolled down

    Buffered rendered TreePanel setRootNode fails when the tree has been scrolled down


    Ext version tested:
    • Ext 4.2.0.265

    Browser versions tested against:
    • Chrome 24.0.1312.52 m
    • IE9

    Description:

    I have a TreePanel configured with the BufferedRenderer plugin. After the tree is loaded, and after I scroll down the tree a couple of pages (via PageDown), if I try to reload the tree it fails with:

    Unable to get value of the property 'insertSibling': object is null or undefined
    in this function:

    Code:
        doAdd: function(records, index) {
            var me = this,
                nodes = me.bufferRender(records, index, true),
                all = me.all,
                count = all.getCount(),
                i, l;
    
            if (count === 0) {
                for (i = 0, l = nodes.length; i < l; i++) {
                    this.getNodeContainer().appendChild(nodes[i]);
                }
            } else if (index < count) {
                if (index === 0) {
                    all.item(index).insertSibling(nodes, 'before', true);
                } else {
                    all.item(index - 1).insertSibling(nodes, 'after', true);
                }
            } else {
                all.last().insertSibling(nodes, 'after', true);
            }
    
            all.insert(index, nodes);
            return nodes;
        },
    at this line:

    Code:
    all.item(index).insertSibling(nodes, 'before', true);

    Steps to reproduce the problem:

    • Unzip the attached file in a directory where you can open app.html in your own web server of choice. Before you do that you might have to change app.html to point to the local directory where you keep extjs 4.2.0.265
    • Assuming you've successfuly opened the page in a browser, click on the Load Tree button. The data is loaded and alert message is displayed. Click the OK button.
    • Select the first node in the tree
    • Now press PageDown twice (now, this depends on how big the browser window is, you might have to scroll down more, basically enough to force the buffer to kick in)
    • Click again on the Load Tree button. This time the browser fails to reload the tree
    The result that was expected:
    • The second click should reload the tree
    The result that occurs instead:
    • The tree is not reloaded and the mask stays on. When debugging in IE9 and VS 2010 the page fails with the error described above
    Attached Files

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    St. Louis, MO
    Posts
    33,599
    Vote Rating
    435
    mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of

      0  

    Default


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