1. #1
    Ext JS Premium Member westy's Avatar
    Join Date
    Feb 2009
    Location
    Bath, UK
    Posts
    905
    Vote Rating
    40
    westy is a jewel in the rough westy is a jewel in the rough westy is a jewel in the rough

      0  

    Default Expanding tree nodes scrolls to top?

    Expanding tree nodes scrolls to top?


    Just noticed this, and not sure if it is something specific to my tree panels or not, but whenever I expand a tree node the scroller jumps to the top of the panel. Another show stopper.

    I'll investigate.

    Thought would post in case others have seen it.
    Product Architect
    Altus Ltd.

  2. #2
    Ext JS Premium Member westy's Avatar
    Join Date
    Feb 2009
    Location
    Bath, UK
    Posts
    905
    Vote Rating
    40
    westy is a jewel in the rough westy is a jewel in the rough westy is a jewel in the rough

      0  

    Default


    Oh, only occurs if a load happens, if expand, scroll, collapse and then expand again it's fine.
    Product Architect
    Altus Ltd.

  3. #3
    Ext JS Premium Member westy's Avatar
    Join Date
    Feb 2009
    Location
    Bath, UK
    Posts
    905
    Vote Rating
    40
    westy is a jewel in the rough westy is a jewel in the rough westy is a jewel in the rough

      0  

    Default


    Hmm, it's ok, seems it was me.

    In my onProxyLoad I had:
    Code:
            // Need to refresh, otherwise get the crazy multi-node issue if have to login again for some reason.
            // Would like to better understand it but... seems to solve double-animation issue too
            // Could possibly do in item add event, or something.
            var panel = me.getPanel();
            if (panel) {
                var view = panel.getView();
                if (view) {
                    if (!me.onLoadViewRefreshTask) {
                        me.onLoadViewRefreshTask = Ext.create('Ext.util.DelayedTask', function() {
                            view.refresh();
                        });
                    }
    
    
                    me.onLoadViewRefreshTask.delay(10);
                }
            }
    Commenting out view.refresh stopped it jumping to the top.

    Oh, just spotted a new preserveScrollOnRefresh config item on tree view... hmmm
    Product Architect
    Altus Ltd.

  4. #4
    Ext JS Premium Member westy's Avatar
    Join Date
    Feb 2009
    Location
    Bath, UK
    Posts
    905
    Vote Rating
    40
    westy is a jewel in the rough westy is a jewel in the rough westy is a jewel in the rough

      0  

    Default


    Ok, nothing to see here, move along
    Product Architect
    Altus Ltd.