-
9 Nov 2012 5:02 AM #1
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
-
4 Dec 2012 6:37 AM #2
Hi, I have the same issue... does anybody has a hint ?
-
5 Dec 2012 9:25 AM #3
ExtJS 4.1
I could narrow down the issue to the following function:
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.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 }); } } });
I just did an override and commented the updateLayout(); out, hopefully it will not affect other behavior.


Reply With Quote