From 0916bff81d57ce2df16350164bae460946a79b4a Mon Sep 17 00:00:00 2001 From: Victor Dubiniuk Date: Tue, 2 Jul 2013 18:44:10 +0300 Subject: Fix lazy styles loading in IE8 --- core/js/js.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'core/js') diff --git a/core/js/js.js b/core/js/js.js index a4665b927f2..aa1bcf642ee 100644 --- a/core/js/js.js +++ b/core/js/js.js @@ -226,8 +226,12 @@ var OC={ var path=OC.filePath(app,'css',style+'.css'); if(OC.addStyle.loaded.indexOf(path)===-1){ OC.addStyle.loaded.push(path); - style=$(''); - $('head').append(style); + if (document.createStyleSheet) { + document.createStyleSheet(path); + } else { + style=$(''); + $('head').append(style); + } } }, basename: function(path) { -- cgit v1.2.3