PDA

View Full Version : [CLOSED-990] Margins appear after collapse of north element in webkit



Saikanier
24 May 2010, 1:43 AM
Hey,

I discovered a bug for border-layout containers in webkit:



Ext.onReady(function(){
var viewport = new Ext.Viewport({
layout:'border',
border:false,
items:[
{
region:'north',
height: 90,
id:'north-panel',
html:'My site header',
border:false,
minWidth:768,
hideCollapseTool:true,
bodyCssClass:'header'
},
{
region:'center',
//contentEl: 'center_start',
id:'center-panel',
cls:'body',
bodyCssClass:'shadowBox',
border:true,
layout:'border',
defaults:{
border:false
},
items:[
{
region:'north',
layout:'fit',
defaultType: 'textfield',
margins:"0 0 0 0",
cmargins:"0 0 0 0",
collapsible:true,
resizeable:false,
split:false,
height: 90,
html:"North region"
},{
region:'center',
layout:'fit',
html:'Center region'
}
],
shadow:'drop',
margins:{
top:0,
left:30,
right:30,
bottom:15
},
autoScroll:true
}
]
});
});
A working demonstration of this bug can be found here: http://nabbed.net/extjsbug/bug_collapse.html

If you click on the "collapse" icon of the north region to collapse the panel and click it again so it is not collapsed anymore, margins on the right and on the bottom of the container appear (although there were no margins before).

20642

This can be observed on Safari and Chrome on both Mac and Windows. Firefox works as expected.

-markus

Stju
24 May 2010, 7:19 PM
Same on FF 3.6.3. I don't think this is a bug. Any other region after collapse will have border as well!

Saikanier
25 May 2010, 12:51 AM
For me this works on FF 3.6.3 and WinXP. I added a screenshot of the issue to the original post to make clear what the problem actually is.

evant
14 Jul 2010, 2:56 AM
I can confirm the behaviour on WebKit. The problem is caused by providing the autoScroll attribute on the border layout. It doesn't make sense to have this here, since all components will automatically be sized to fit the size of the container, so overflowing isn't possible, this is just the nature of the layout.

Marking this as closed.