diff --git a/CHANGES.md b/CHANGES.md index 4e32b4789e3..f40288575f0 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -3,6 +3,7 @@ CKEditor 4 Changelog ## CKEditor 4.3.2 +* [#11121](http://dev.ckeditor.com/ticket/11121): [Firefox] Fixed: High Contrast mode is enabled when editor is loaded in hidden iframe. * [#11350](http://dev.ckeditor.com/ticket/11350): The default value of [`config.contentsCss`](http://docs.ckeditor.com/#!/api/CKEDITOR.config-cfg-contentsCss) is affected by [`CKEDITOR.getUrl`](http://docs.ckeditor.com/#!/api/CKEDITOR-method-getUrl). * [#11097](http://dev.ckeditor.com/ticket/11097): Improved the [Autogrow](http://ckeditor.com/addon/autogrow) plugin performance when dealing with very big tables. * [#11290](http://dev.ckeditor.com/ticket/11290): Removed redundant code in `sourcedialog` plugin. diff --git a/core/_bootstrap.js b/core/_bootstrap.js index be568814a4f..0ca96d10920 100644 --- a/core/_bootstrap.js +++ b/core/_bootstrap.js @@ -13,15 +13,20 @@ CKEDITOR.env.hc = false; else { // Check whether high contrast is active by creating a colored border. - var hcDetect = CKEDITOR.dom.element.createFromHtml( '
', CKEDITOR.document ); + var hcDetect = CKEDITOR.dom.element.createFromHtml( '
', CKEDITOR.document ); hcDetect.appendTo( CKEDITOR.document.getHead() ); // Update CKEDITOR.env. // Catch exception needed sometimes for FF. (#4230) try { - CKEDITOR.env.hc = hcDetect.getComputedStyle( 'border-top-color' ) == hcDetect.getComputedStyle( 'border-right-color' ); + var top = hcDetect.getComputedStyle( 'border-top-color' ), + right = hcDetect.getComputedStyle( 'border-right-color' ); + + // We need to check if getComputedStyle returned any value, because on FF + // it returnes empty string if CKEditor is loaded in hidden iframe. (#11121) + CKEDITOR.env.hc = !!( top && top == right ); } catch ( e ) { CKEDITOR.env.hc = false; }