View Full Version : [URGENT] scrolling issue after panel.update(html)

20 Dec 2011, 12:45 AM
Hi dev team,
I've been bothered by this issue for long time.

Goal: A list is shown. We click on one item, then it turns to a panel with the content of Ajax-fetched HTML.
if the content is longer than panel body viewpoint, you cannot scroll down. i.e., you scroll down and let go your finger, it bounces to the top.
And what's interesting is, the bug does happen when you browse it for the first time. Once you cannot scroll, you close the browser and browse it again, you can scroll then!

Here's the sample code:

mag.views.HtmlPage = Ext.extend(Ext.Panel, {
autoLoad: '',
scroll: 'vertical',
styleHtmlContent: true,
initComponent: function(){

var toolbarBase = {
xtype: 'toolbar',
title: 'Article'
this.dockedItems = toolbarBase;
url: this.url,
success: function(rs){
// I have tried to put this.doLayout(); this.doComponentLayout();
//here, but didn't work
// [panel.height is fixed] how to support the panel.body scroll according to dynamic content height here then?

scope: this

I found the same problem happens with Secha examples. Is there sth wrong with the panel.body height calculation?

Anybody help? I'm still new to secha, and appreciate if there's any hint. Thanks!

20 Dec 2011, 4:25 AM
The boundaries aren't being updated when you use update(). What happens when you add/remove a Component?

20 Dec 2011, 8:20 PM
Hi Mitchell,
Thanks a lot!

In my project, I don't need to add/remove component. To be more specific, I only need to show various contents in a fixed-height panel by fetching contents via ajax.

However, the panel height has been set fixed , while the content height is dynamic, so if the content height is bigger than the panel height, we need to support vertical scroll.

If the panel.update() cannot support inner scroller recalculation, what should I do to support?