There is a bug if you add one of the following properties to a Ext.Panel:
  • margin
  • padding
  • padding
the bug occurs in the onRender function:

example:
PHP Code:
...
if (
this.padding != undefined) {
            
bodyCfg.style +=
                
'padding: ' +
                    
Ext.Element.parseBox((this.padding === true) ? 5
                        
this.padding) + ';';
}
... 
reason:
PHP Code:
 Ext.Element.parseBox() 
returns an object but it must be a string for the style string concatenation

result:
the styles for padding, margin or border are not added to the Panel


testscript:
PHP Code:
Ext.onReady( function() {
    new 
Ext.Panel({
            
fullscreentrue,
            
renderToExt.getBody(),
            
padding20,
            
border10,
            
margin35,
            
html'padding test'
    
});
});