PDA

View Full Version : [OPEN] [CLOSED][3.??] Layout error on TBAR definition inside a TabPannel



dragnovich
22 Jun 2009, 8:04 PM
Hello I find a bug when triying to make a basic layout, I publish the case in the help post:
http://www.extjs.com/forum/showthread.php?t=72013

Using the ext-all-debug.js version of the code I find that IE was breaking because in the Ext.Element.addMethods definition of setHeight, if the height value is negative, then that causes an error.

This is the original source (line 3711 from the ExtJS 3.0 RC2):



setHeight : function(height, animate){
var me = this;
height = me.adjustHeight(height);
!animate || !me.anim ?
me.dom.style.height = me.addUnits(height) :
me.anim({height : {to : height}}, me.preanim(arguments, 1));
return me;
},


And my FiX was ...




setHeight : function(height, animate){
var me = this;
height = me.adjustHeight(height);
if(height >= 0 || height == 'auto') {
!animate || !me.anim ?
me.dom.style.height = me.addUnits(height) :
me.anim({height : {to : height}}, me.preanim(arguments, 1));
}
return me;
},


Don't know if thats the BEST solution to that problem, but it fixed it, I first try to assign the height: X, or autoHeight:, config parameters in the object definition (it applyed right as I see the height fixed to the values I set), but it does not fixed the negative values issue. So I add the IF and all work perfect now.

~o)

evant
22 Jun 2009, 9:15 PM
As suggested, this is already fixed in SVN.