JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
vanilla ckeditor-3.0.1
[ckeditor.git] / _source / core / _bootstrap.js
index 6c0440d..a25905c 100644 (file)
@@ -22,7 +22,16 @@ For licensing, see LICENSE.html or http://ckeditor.com/license
        hcDetect.appendTo( CKEDITOR.document.getHead() );\r
 \r
        // Update CKEDITOR.env.\r
-       if ( ( CKEDITOR.env.hc = ( hcDetect.getComputedStyle( 'background-image' ) == 'none' ) ) )\r
+       // Catch exception needed sometimes for FF. (#4230)\r
+       try\r
+       {\r
+               CKEDITOR.env.hc = ( hcDetect.getComputedStyle( 'background-image' ) == 'none' );\r
+       }\r
+       catch (e)\r
+       {\r
+               CKEDITOR.env.hc = false;\r
+       }\r
+       if ( CKEDITOR.env.hc )\r
                CKEDITOR.env.cssClass += ' cke_hc';\r
 \r
        hcDetect.remove();\r