PDA

View Full Version : [OPEN] [4.1B3] Panel collapse/expand behavior broken



mankz
28 Feb 2012, 11:35 PM
Collapsing and then expanding panel programmatically doesn't work.

Siesta test case:


StartTest(function(t) {
t.diag('Panel height issue: ');

var p = Ext.create('Ext.Panel', {
width: 500,
height: 300,
title : 'foo',
renderTo : Ext.getBody(),
html : 'foo'
});

p.hide();
p.collapse();
p.show();
p.expand();

// Wait for anim to complete
t.waitFor(2000, function() {
t.is(p.el.getHeight(), 300, 'Height ok'); // RETURNS 26, only header shown
});
});



Using animCollapse : false then all is ok.

mitchellsimoens
29 Feb 2012, 12:31 PM
If the panel is hidden, the animation should be skipped and collapse should collapse it as if animCollapse as false. If the panel is shown and you do rapid calls like that (which I don't know of a use case for this to happen) I would expect it to cancel the collapsing and expand correctly.

We will take a look at this.

shadizar
3 Sep 2013, 1:38 AM
On Ext4.1.0 I have a similar issue:

- I start with a panel inside a window,
- I check if the panel should be expanded or not => panel.collapse() or panel.expand()
- I make the window popup => window.show()

Result:
- the panel is collapsed ( in this case ) and I cannot expand it programatically or otherwise because it has some properties isCollapsingOrExpanding : 1 or collapsed: false