1. #1
    Sencha User
    Join Date
    Nov 2012
    Posts
    14
    Vote Rating
    0
    Rockz is on a distinguished road

      0  

    Default Unanswered: Expanding/Collapising panel moving the scroll bar to the top of the window.

    Unanswered: Expanding/Collapising panel moving the scroll bar to the top of the window.


    Hi All,


    I have a panel in a window in my application which is adding some other collapsible panels as the child items dynamicaaly based on the store data.The Panel grows in height accordingly to the data and when there is enough data the browser correctly renders a scrollbar.But when I then scroll down a bit and expand or collapse a group the browser goes back to the top of the page.




    Any suggestion is highly appreciated.



    Thanks
    Rockz

  2. #2
    Sencha User
    Join Date
    Jul 2012
    Posts
    33
    Vote Rating
    4
    Answers
    4
    Alexander Bauer is on a distinguished road

      0  

    Default


    Hi, I have the same issue... does anybody has a hint ?

  3. #3
    Sencha User
    Join Date
    Jul 2012
    Posts
    33
    Vote Rating
    4
    Answers
    4
    Alexander Bauer is on a distinguished road

      0  

    Default


    ExtJS 4.1
    I could narrow down the issue to the following function:

    Code:
    Ext.override(Ext.panel.Header, {
       setTitle: function(title) {
            var me = this,
                titleCmp = me.titleCmp;
                
            me.title = title;
            if (titleCmp.rendered) {
                titleCmp.textEl.update(me.title || ' ');
                // titleCmp.updateLayout();
            } else {
                me.titleCmp.on({
                    render: function() {
                        me.setTitle(title);
                    },
                    single: true
                });
            }
        }
    });
    due to the updateLayout(); function, the scrollBar jumps to the top. Therefore whenever the title of the panel was changed, the scroll bar jumped to the top.
    I just did an override and commented the updateLayout(); out, hopefully it will not affect other behavior.

Thread Participants: 1