PDA

View Full Version : [FIXED-543][3.1.1] Window collapse bug - Firefox



Rowan
9 Feb 2010, 6:23 AM
In firefox there is the following CSS rule applied



.ext-gecko .x-panel-animated div {
overflow:hidden !important;
}


When you have a window that animates to open but not to minimise the class x-panel-animated is left on the window meaning that overflow is always set to hidden on the child





var windowConfig = {
animCollapse: false,
autoScroll: true,
autoShow: true,
border: false,
closable: true,
closeAction: 'hide',
constrainHeader: true,
height: 600,
layout: 'border',
minimizable: true,
minWidth: 300,
minHeight: 400,
plain: true,
resizeHandles: 'none',
shadow: true,
width: 400
};

// Create the window and add default minimise handlers
var win = new Ext.Window(windowConfig);
win.on('minimize', function(){
win.toggleCollapse();
});


The class is not removed when minimising / expanding a window but for some reason is added on collapse.

The fix



win.on('expand', function(window){
window.el.removeClass('x-panel-animated');
});

mystix
9 Feb 2010, 7:49 AM
that class is added by the Ext.Panel#afterEffect() method.

it shouldn't have to check for animation before removing that class.

the following override should resolve the issue once and for all:


Ext.override(Ext.Panel, {
// private
afterEffect : function(anim) {
this.syncShadow();
// if (anim !== false) {
this.el.removeClass('x-panel-animated');
// }
}
});

Jamie Avins
4 Mar 2010, 11:12 AM
[type]: fix
[module]: Panel
[id]: #543
[desc]: Fixes #543. AfterEffect for panel now always attempts to remove the x-panel-animated class.