back to krasimirtsonev.com
to blog's home page

Another IE surprise

We all know that the usage of InternetExplorer brings a lot of problems for us (the developers). Did you know that there is a JavaScript method createStyleSheet that you can call only 31 times.

There is a nice file manager called CKEditor. It worked fine, but today it produced the following javascript error in IE:
I googled the problem and found this thread. It perfectly explains the problem - the usage of createStyleSheet. The solution is not very elegant, but I think it solved the problem. I opened ckfinder.js and found the following code:
Which means that the editor checks if this method is available and then uses it. So I edit the line to:

Of course the best option is to reduce the number of the css files that are loaded in the page.
Sharing ...
Commenting ...
blog comments powered by Disqus