In my mobile two of my views are resizing and looking prefect but third one is not resizing. Only half page is viewable and remaining is not viewable. Any help?

I have extended "Ext.Container" for first two views and "Ext.form.panel" for the third. Is their any chances that because of the "Ext.form.panel" this might happen?

Edit : Its a sencha touch application.

  • Sencha Ext or Sencha Touch? Commented Jan 2, 2014 at 8:08

1 Answer 1


For a Sencha Ext app to resize itself to its Salesforce container you need to notify it of window resize events and also set the layout to occupy 100% of the width.

The only component that reacts to window resize events is Ext.container.Viewport - but this will also occupy the entire browser frame, trampling other stuff on the page.

So you can pinch the resize code from Ext.container.Viewport and place that in your panel. Or you can subclass Viewport to create a special panel that doesn't inject itself into the body and uses the width of its parent element instead.

Bonus points for adding an event listener on the Salesforce collapsible sidebar (when enabled) to react to the user toggling that too.


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .