View Full Version : createStyleSheet() in ext-all.js not returning

22 Oct 2007, 12:42 AM
Hi All,
I am having a problem with the grid in my web application not being rendered (I'm using 1.1). I have tracked down the problem and it looks like the function createStyleSheet() in ext-all-debug.js never returns. Taking a closer look at the code, I found that the call to the statement in bold never returns.

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;
rules.cssText = cssText;


ss = rules.styleSheet ? rules.styleSheet : (rules.sheet || doc.styleSheets[doc.styleSheets.length-1]);
return ss;
To see in the conditional operator statement where exactly is the problem, I changed it to the following if else and the statement in bold never returns.

if (rules.styleSheet) {
ss = rules.styleSheet;
} else if (rules.sheet) {
ss = rules.sheet;
} else {
ss = doc.styleSheets[doc.styleSheets.length-1];
I removed the last statement just to see if it is the problem. and indeed the flow of execution continues (instead of not returning) but the columns in the grid are never rendered.

I am using Opera 8.65 on windows mobile 5. I know it is not a supported browser, but if it is easy to nail down the problem and find a simple fix I would really appreciate it.