PDA

View Full Version : [FIXED] 4.2 hide() doesn't work properly while the panel is floated



aedos
9 Apr 2013, 10:54 PM
Ext version tested:

Ext 4.4.2.0.663
Browser versions tested against:

Chrome
FF
Description:

When hide() is called on a west or south region of a Border layout, it hides the region and the slitter. However when floated is true for the region, and hide() is called while the region is floated out, it doesn't work as expected, and leaves the region in a weird state.
Steps to reproduce the problem:

Run test case below.
Click "Close" button on west region. The west region and the splitter become hidden, as expected.
Click "Open West" in the center panel, the region and the splitter appear again, as expected.
Click the splitter to collapse west region.
Click the titlebar area to "float" out the west region.
Click the "Close" button on the west region: The region doesn't hide properly; the titleBar doesn't hide; and the splitter disappears ...
Same problem with the south region.
Test Case:


Ext.onReady(function() {
Ext.create('Ext.panel.Panel', {
width: 500,
height: 300,
title: 'Border Layout',
layout: 'border',
items: [{
region: 'south', // position for region
xtype: 'panel',
height: 100,
hideCollapseTool: true,
collapsible: true, // make collapsible
split: true, // enable resizing
margins: '0 5 5 5',
id:'south',
items: {
xtype:'button',
text: 'Close',
handler: function() {
var me = this;
new Ext.util.DelayedTask(function(){
me.ownerCt.hide();
}).delay(300);
}
}
},{
region:'west',
xtype: 'panel',
margins: '5 0 0 5',
width: 200,
collapsible: true, // make collapsible
hideCollapseTool:true,
id: 'west',
layout: 'hbox',
split:true,
header:false,
items:{
xtype:'button',
text: 'Close',
handler: function() {
var me = this;
new Ext.util.DelayedTask(function(){
me.ownerCt.hide();
}).delay(300);
}
}
},{
title: 'Center Region',
region: 'center', // center region is required, no width/height specified
xtype: 'panel',
layout: 'hbox',
margins: '5 5 0 0',
items:[{
xtype:'button',
text:'Open West',
handler: function() {
Ext.ComponentManager.get('west').show();
}
},{
xtype:'button',
text:'Open South',
handler: function() {
Ext.ComponentManager.get('south').show();
}
}]
}
],
renderTo: Ext.getBody()
});
})

mitchellsimoens
10 Apr 2013, 5:08 AM
Thanks for the report.