Hybrid View

    Looks like we can't reproduce the issue or there's a problem in the test case provided.
  1. #1
    Ext JS Premium Member
    Join Date
    Jan 2010
    Location
    San Diego, CA
    Posts
    254
    Vote Rating
    5
    dbrin is on a distinguished road

      0  

    Exclamation Tree scrolls to top on node expand.

    Tree scrolls to top on node expand.



    Ext version tested:
    • Ext 4.1.1
    Browser versions tested against:
    • IE8
    • FF15
    • Chrome
    Description:
    • When a node on a tree expands and loads from server the view scrolls to the top.
    Steps to reproduce the problem:
    • Scroll to the bottom of the tree panel
    • Expand the last Node
    The result that was expected:
    • Last Node is shown with its children
    The result that occurs instead:
    • View scrolls to the top and the expanded node is not visible.
    See this URL for live test case:
    http://jsfiddle.net/dbrin/MZ5FG/show/light/


    Operating System:
    • Win7

  2. #2
    Sencha - Ext JS Dev Team Animal's Avatar
    Join Date
    Mar 2007
    Location
    Notts/Redwood City
    Posts
    30,546
    Vote Rating
    62
    Animal has a spectacular aura about Animal has a spectacular aura about Animal has a spectacular aura about

      0  

    Default


    As a workaround, configure your TreeGrid with

    Code:
    viewConfig: {
        preserveScrollOnRefresh: true
    }

  3. #3
    Sencha - Ext JS Dev Team Animal's Avatar
    Join Date
    Mar 2007
    Location
    Notts/Redwood City
    Posts
    30,546
    Vote Rating
    62
    Animal has a spectacular aura about Animal has a spectacular aura about Animal has a spectacular aura about

      0  

    Default


    Strange, because if you modify extjs/examples/tree/treegrid.html to remove the singleExpand: true config, it does not exhibit your bug.

    No other trees do either.

  4. #4
    Ext JS Premium Member
    Join Date
    Jan 2010
    Location
    San Diego, CA
    Posts
    254
    Vote Rating
    5
    dbrin is on a distinguished road

      0  

    Default


    Perfect!

  5. #5
    Sencha - Ext JS Dev Team evant's Avatar
    Join Date
    Apr 2007
    Location
    Sydney, Australia
    Posts
    17,170
    Vote Rating
    674
    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


    I can't reproduce this on the latest code:

    http://screencast.com/t/9meV0wVt

    Code:
    Ext.define('ESSR.model.Request', {
        extend: 'Ext.data.Model',
        fields: [{
            name: 'idd',
            type: 'int'
        }, {
            name: 'name',
            type: 'string'
        }, {
            name: 'f1',
            defaultValue: 'field 1'
        }, {
            name: 'f2',
            defaultValue: ' some other default value'
        }]
    });
    
    Ext.require('*');
    
    Ext.onReady(function() {
    
        var store = new Ext.data.TreeStore({
            model: 'ESSR.model.Request',
            autoLoad: false,
            proxy: {
                type: 'ajax',
                url: 'data.json',
                reader: {
                    type: 'json',
                    root: 'data'
                }
            },
            root: {
                expanded: false //important for autoload to work properly
            }
        });
    
        Ext.create('Ext.tree.Panel', {
            renderTo: Ext.getBody(),
            width: 550,
            height: 400,
            store: store,
            columns: [{
                xtype: 'treecolumn',
                text: 'IDD',
                dataIndex: 'idd',
                width: 120
            }, {
                text: 'Name',
                dataIndex: 'name',
                width: 120
            }, {
                text: 'F1',
                dataIndex: 'f1',
                width: 120
            }, {
                text: 'F2',
                dataIndex: 'f2',
                width: 120
            }]
        });
        store.getRootNode().expand();
    });
    Code:
    {
        "data": [
            {
                "idd": 1,
                "name": "First"
            }, {
                "idd": 2,
                "name": "Second"
            }, {
                "idd": 2,
                "name": "Second"
            }, {
                "idd": 2,
                "name": "Second"
            }, {
                "idd": 2,
                "name": "Second"
            }, {
                "idd": 2,
                "name": "Second"
            }, {
                "idd": 2,
                "name": "Second"
            }, {
                "idd": 2,
                "name": "Second"
            }, {
                "idd": 2,
                "name": "Second"
            }, {
                "idd": 10,
                "name": "Second"
            }, {
                "idd": 2,
                "name": "Second"
            }, {
                "idd": 12,
                "name": "Second"
            }, {
                "idd": 2,
                "name": "Second"
            }, {
                "idd": 2,
                "name": "Second"
            }, {
                "idd": 2,
                "name": "Second"
            }, {
                "idd": 2,
                "name": "Second"
            }, {
                "idd": 2,
                "name": "Second"
            }, {
                "idd": 2,
                "name": "Second"
            }, {
                "idd": 2,
                "name": "Second"
            }, {
                "idd": 20,
                "name": "Second"
            }, {
                "idd": 2,
                "name": "Second"
            }, {
                "idd": 22,
                "name": "Second"
            }, {
                "idd": 2,
                "name": "Second"
            }, {
                "idd": 2,
                "name": "Second"
            }, {
                "idd": 2,
                "name": "Second"
            }, {
                "idd": 2,
                "name": "Second"
            }, {
                "idd": 2,
                "name": "Second"
            }, {
                "idd": 2,
                "name": "Second"
            }, {
                "idd": 2,
                "name": "Second"
            }, {
                "idd": 2,
                "name": "Second"
            }, {
                "idd": 2,
                "name": "Second"
            }, {
                "idd": 32,
                "name": "Second"
            }, {
                "idd": 2,
                "name": "Second"
            }, {
                "idd": 2,
                "name": "Second"
            }, {
                "idd": 2,
                "name": "Second"
            }, {
                "idd": 2,
                "name": "Second"
            }, {
                "idd": 2,
                "name": "Second"
            }, {
                "idd": 2,
                "name": "Second"
            }, {
                "idd": 2,
                "name": "Second"
            }, {
                "idd": 2,
                "name": "Second"
            }, {
                "idd": 2,
                "name": "Second"
            }, {
                "idd": 2,
                "name": "Second"
            }, {
                "idd": 2,
                "name": "Second"
            }, {
                "idd": 42,
                "name": "Second"
            }, {
                "idd": 2,
                "name": "Second"
            }, {
                "idd": 2,
                "name": "Second"
            }, {
                "idd": 2,
                "name": "Second"
            }, {
                "idd": 2,
                "name": "Second"
            }, {
                "idd": 2,
                "name": "Second"
            }, {
                "idd": 2,
                "name": "Second"
            }, {
                "idd": 2,
                "name": "Second"
            }, {
                "idd": 2,
                "name": "Second"
            }, {
                "idd": 2,
                "name": "Second"
            }, {
                "idd": 52,
                "name": "Second"
            }, {
                "idd": 2,
                "name": "Second"
            }, {
                "idd": 2,
                "name": "Second"
            }, {
                "idd": 2,
                "name": "Second"
            }, {
                "idd": 2,
                "name": "Second"
            }, {
                "idd": 2,
                "name": "Second"
            }, {
                "idd": 2,
                "name": "Second"
            }, {
                "idd": 2,
                "name": "Second"
            }, {
                "idd": 2,
                "name": "Second"
            }, {
                "idd": 2,
                "name": "Second"
            }, {
                "idd": 62,
                "name": "Second"
            }, {
                "idd": 2,
                "name": "Second"
            }, {
                "idd": 2,
                "name": "Second"
            }, {
                "idd": 2,
                "name": "Second"
            }, {
                "idd": 2,
                "name": "Second"
            }, {
                "idd": 2,
                "name": "Second"
            }, {
                "idd": 2,
                "name": "Second"
            }, {
                "idd": 2,
                "name": "Second"
            }, {
                "idd": 2,
                "name": "Second"
            }, {
                "idd": 2,
                "name": "Second"
            }, {
                "idd": 72,
                "name": "Second"
            }, {
                "idd": 2,
                "name": "Second"
            }, {
                "idd": 2,
                "name": "Second"
            }, {
                "idd": 2,
                "name": "Second"
            }, {
                "idd": 2,
                "name": "Second"
            }, {
                "idd": 2,
                "name": "Second"
            }, {
                "idd": 2,
                "name": "Second"
            }, {
                "idd": 2,
                "name": "Second"
            }, {
                "idd": 82,
                "name": "Second"
            }, {
                "idd": 2,
                "name": "Second"
            }, {
                "idd": 2,
                "name": "Second"
            }, {
                "idd": 2,
                "name": "Second"
            }, {
                "idd": 2,
                "name": "Second"
            }, {
                "idd": 2,
                "name": "Second"
            }, {
                "idd": 2,
                "name": "Second"
            }, {
                "idd": 2,
                "name": "Second"
            }, {
                "idd": 92,
                "name": "Second"
            }, {
                "idd": 2,
                "name": "Second"
            }, {
                "idd": 2,
                "name": "Second"
            }, {
                "idd": 2,
                "name": "Second"
            }, {
                "idd": 2,
                "name": "Second"
            }, {
                "idd": 2,
                "name": "Second"
            }, {
                "idd": 2,
                "name": "Second"
            }, {
                "idd": 2,
                "name": "Second"
            }, {
                "idd": 2,
                "name": "Second"
            }, {
                "idd": 2,
                "name": "Second"
            }, {
                "idd": 102,
                "name": "Second"
            }, {
                "idd": 2,
                "name": "Second"
            }, {
                "idd": 2,
                "name": "Second"
            }, {
                "idd": 2,
                "name": "Second"
            }, {
                "idd": 2,
                "name": "Second"
            }, {
                "idd": 2,
                "name": "Second"
            }, {
                "idd": 2,
                "name": "Second"
            }, {
                "idd": 2,
                "name": "Second"
            }, {
                "idd": 2,
                "name": "Second"
            }, {
                "idd": 2,
                "name": "Second"
            }, {
                "idd": 112,
                "name": "Second"
            }, {
                "idd": 2,
                "name": "Second"
            }, {
                "idd": 2,
                "name": "Second"
            }, {
                "idd": 2,
                "name": "Second"
            }, {
                "idd": 2,
                "name": "Second"
            }, {
                "idd": 2,
                "name": "Second"
            }, {
                "idd": 2,
                "name": "Second"
            }, {
                "idd": 2,
                "name": "Second"
            }, {
                "idd": 120,
                "name": "Second"
            }
        ]
    }
    Evan Trimboli
    Sencha Developer
    Twitter - @evantrimboli
    Don't be afraid of the source code!

  6. #6
    Ext JS Premium Member
    Join Date
    Jan 2010
    Location
    San Diego, CA
    Posts
    254
    Vote Rating
    5
    dbrin is on a distinguished road

      0  

    Default


    cool. is that with 4.1.2 ? is there a CDN I call pull from to use on JSFiddle ?

  7. #7
    Sencha - Ext JS Dev Team evant's Avatar
    Join Date
    Apr 2007
    Location
    Sydney, Australia
    Posts
    17,170
    Vote Rating
    674
    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


    Yes, what will end up being 4.1.2.

    No, there's no CDN, it has not yet been released.
    Evan Trimboli
    Sencha Developer
    Twitter - @evantrimboli
    Don't be afraid of the source code!