Skip to content

Commit

Permalink
Merge branch 't/11121'
Browse files Browse the repository at this point in the history
  • Loading branch information
Reinmar committed Dec 30, 2013
2 parents 0552435 + 8c7a1d5 commit ac648cc
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGES.md
Expand Up @@ -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.
Expand Down
11 changes: 8 additions & 3 deletions core/_bootstrap.js
Expand Up @@ -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( '<div style="width:0px;height:0px;position:absolute;left:-10000px;' +
'border: 1px solid;border-color: red blue;"></div>', CKEDITOR.document );
var hcDetect = CKEDITOR.dom.element.createFromHtml( '<div style="width:0;height:0;position:absolute;left:-10000px;' +
'border:1px solid;border-color:red blue"></div>', 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;
}
Expand Down

0 comments on commit ac648cc

Please sign in to comment.