View Full Version : ExtJs 3.1.0 : IE8 invalid argument on cssText assignement

12 Mar 2013, 8:26 AM

My problem is the same as described in this post (http://www.sencha.com/forum/showthread.php?52930-2.2-IE-7-Error-with-cssText-assignment).

After a certain constant number of successful runs (16 I think), the following code chokes:

createStyleSheet : function(cssText, id){
var ss;
var head = doc.getElementsByTagName("head")[0];
var rules = doc.createElement("style");
rules.setAttribute("type", "text/css");
rules.setAttribute("id", id);
ss = rules.styleSheet;
ss.cssText = cssText; // <== error here, invalid argument

Getting there and via IE debugging tool and manually entering code like
ss.cssText = "" fails too.

This code is called from Feyasoft Calendar, DayView.js

var cssText = '.'+this.id+'-x-dayview-viewer-row-height{}' +
'.'+this.id+'-x-dayview-pool{overflow:hidden}' +
'.'+this.id+'-x-dayview-pool-height{}' +
'.'+this.id+'-x-dayview-pool-width{}' +
'.'+this.id+'-x-dayview-pool-viewer-width{}' +
var cid = Ext.id();
this.ss = Ext.util.CSS.createStyleSheet(cssText, cid);

I don't know where to look now. Can anyone help ?

Edit: problem exists in IE9 also

14 Mar 2013, 7:46 AM
Is it creating a new stylesheet each time?

20 Mar 2013, 4:57 AM
Thanks for replying.

I'm not sure I understand your question : generateCSS is called in generateHTML, which is called once per component initialisation.

On every display of the Calendar, three DayView components and two MonthView components are generated, and initialized, with a new stylesheet created for each of them, that is five stylesheets created.

The error occurs after five redisplays of Feyasoft Container, on the second DayView component, that is on the 27th stylesheet created.

Not sure how this helps you help me...