PDA

View Full Version : IE8 with http://www.extjs.com/blog/images/plugins/label-plugin.html



BuckBazooka
1 Mar 2010, 8:29 AM
Hi,

when I view the following example http://www.extjs.com/blog/images/plugins/label-plugin.html with my IE8 running on Windows 7 I do not see the panel which should be seen.

This example works properly with Firefox but bombs with IE8.

I have noticed this because my program uses this technique with the FieldLabeler plugins.

What I can see is that this panel causes the problem with IE. If I remove "plugins: ... FieldLabeler" the error goes away ( of course also its functionality goes away).



{ xtype: 'textarea'
,plugins: [ Ext.ux.FieldLabeler ]
,fieldLabel: 'Remark'
,hideLabel: false
,name: 'invoice.remark'
,value: invoice.remark
,disabled: (invoice.locked != null)
,height:60
}


*ALSO* I notice that if you use the FieldLabeler and disable:true a panel, then only the label is shown! This problem is also noticeable only in IE.

Any advice how to go around this problem? Is this a know issue?
thanks for your help.

mitchellsimoens
1 Mar 2010, 9:50 AM
I agree with this bug but think it needs moved to the Bugs forum. IE error is:


Message: Invalid argument.
Line: 7
Char: 56975
Code: 0
URI: http://www.extjs.com/blog/images/plugins/ext-all.js

rbastic
1 Mar 2010, 10:29 AM
Definitely a bug. If you'd like to try your hand at fixing it yourself, replace ext-all.js with ext-all-debug.js so you can trace through the code :)

I bet it's a simple patch. Don't have time to look at it yet though.

BuckBazooka
1 Mar 2010, 11:19 PM
Thanks for your replies.
Sorry for the question, but what is the best way to trace with IE? With firefox I am at east with Firebug but IE?
Thanks

mitchellsimoens
2 Mar 2010, 6:44 AM
Thanks for your replies.
Sorry for the question, but what is the best way to trace with IE? With firefox I am at east with Firebug but IE?
Thanks


Tools -> Developer Tools

Not as good as Firebug or Chrome's dev tools but it does some.

BuckBazooka
2 Mar 2010, 8:05 AM
Thanks Mitchell,

This tool is very important for my work. With it I found the following.

At line 4052 in ext-all-debug.js 3.1.0 you have the following:


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


The problem is that at least with IE, width sometimes is set to NaN, and therefore me.addUnits(width) becomes "NaNpx" and line


me.dom.style.width = me.addUnits(width)

Is not executed.

My hugly work around is for the moment:


setWidth : function(width, animate){
var me = this;
width = me.adjustWidth(width);

if((!animate || !me.anim)){
var x = me.addUnits(width);
if(x!="NaNpx") {
me.dom.style.width = x;
}
}
else
me.anim({width : {to : width}}, me.preanim(arguments, 1));
return me;
},



A better solution would be to find why... but I am not enough knowledgeable with the library.

Thanks for your help