Skip to content

Commit ac648cc

Browse files
committed
Merge branch 't/11121'
2 parents 0552435 + 8c7a1d5 commit ac648cc

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

CHANGES.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ CKEditor 4 Changelog
33

44
## CKEditor 4.3.2
55

6+
* [#11121](http://dev.ckeditor.com/ticket/11121): [Firefox] Fixed: High Contrast mode is enabled when editor is loaded in hidden iframe.
67
* [#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).
78
* [#11097](http://dev.ckeditor.com/ticket/11097): Improved the [Autogrow](http://ckeditor.com/addon/autogrow) plugin performance when dealing with very big tables.
89
* [#11290](http://dev.ckeditor.com/ticket/11290): Removed redundant code in `sourcedialog` plugin.

core/_bootstrap.js

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,20 @@
1313
CKEDITOR.env.hc = false;
1414
else {
1515
// Check whether high contrast is active by creating a colored border.
16-
var hcDetect = CKEDITOR.dom.element.createFromHtml( '<div style="width:0px;height:0px;position:absolute;left:-10000px;' +
17-
'border: 1px solid;border-color: red blue;"></div>', CKEDITOR.document );
16+
var hcDetect = CKEDITOR.dom.element.createFromHtml( '<div style="width:0;height:0;position:absolute;left:-10000px;' +
17+
'border:1px solid;border-color:red blue"></div>', CKEDITOR.document );
1818

1919
hcDetect.appendTo( CKEDITOR.document.getHead() );
2020

2121
// Update CKEDITOR.env.
2222
// Catch exception needed sometimes for FF. (#4230)
2323
try {
24-
CKEDITOR.env.hc = hcDetect.getComputedStyle( 'border-top-color' ) == hcDetect.getComputedStyle( 'border-right-color' );
24+
var top = hcDetect.getComputedStyle( 'border-top-color' ),
25+
right = hcDetect.getComputedStyle( 'border-right-color' );
26+
27+
// We need to check if getComputedStyle returned any value, because on FF
28+
// it returnes empty string if CKEditor is loaded in hidden iframe. (#11121)
29+
CKEDITOR.env.hc = !!( top && top == right );
2530
} catch ( e ) {
2631
CKEDITOR.env.hc = false;
2732
}

0 commit comments

Comments
 (0)