PDA

View Full Version : [INFOREQ]IEx's exception at a specific JS expression



xonmac
18 Jun 2010, 11:17 PM
If you look into current ext-all-debug.js, lines 4335 through 4352, you'll see the following code:



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


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;
},


Even the newer IEs raise an exception at this line:



!animate || !me.anim ?


("Invalid argument")

... and IE6 also doesn't like this one:



(!animate || !me.anim) ?


It seems to be an overlook, as in the rest of the code it's nicely wrapped up in a "if"-expression. E.g. line 4479:



if(!animate || !me.anim){
me.dom.style.width = me.addUnits(width);
me.dom.style.height = me.addUnits(height);
}else{
me.anim({width: {to: width}, height: {to: height}}, me.preanim(arguments, 2));
}


Sergei Kozlov
http://netzke.org - ExtJS and Ruby on Rails brought together

evant
20 Jun 2010, 6:57 PM
Please follow the bug guidelines, specifically, how to reproduce the issue: http://www.sencha.com/forum/showthread.php?71015-Posting-to-the-Bug-Forum