Skip to content
Permalink
Browse files

Merge branch 't/11146b'

  • Loading branch information...
Reinmar committed Jan 8, 2014
2 parents eee34a6 + 39cf79e commit 6e69ed572f70a2799de8c3baf2628643455080d8
Showing with 12 additions and 2 deletions.
  1. +3 −0 CHANGES.md
  2. +9 −2 plugins/preview/plugin.js
@@ -17,6 +17,9 @@ CKEditor 4 Changelog
* [#11139](http://dev.ckeditor.com/ticket/11139): [[Divarea](http://ckeditor.com/addon/divarea)] Fixed: Elements path is not cleared after switching to source mode.
* [#10778](http://dev.ckeditor.com/ticket/10778): Fix bug with range enlarge; range no longer expanded visible whitespace.
* [#11281](http://dev.ckeditor.com/ticket/11281): Fixed: Drag handler and mask are duplicated after widget reinitialization.
* [#11146](http://dev.ckeditor.com/ticket/11146): [IE] Fixed: Preview window switches IE to Quirks Mode.
* [#10762](http://dev.ckeditor.com/ticket/10762): [IE] Fixed: JavaScript code displayed in preview window's URL bar.


## CKEditor 4.3.1

@@ -61,10 +61,12 @@
if ( !editor.fire( 'contentPreview', eventData = { dataValue: sHTML } ) )
return false;

var sOpenUrl = '';
var sOpenUrl = '',
ieLocation;

if ( CKEDITOR.env.ie ) {
window._cke_htmlToLoad = eventData.dataValue;
sOpenUrl = 'javascript:void( (function(){' +
ieLocation = 'javascript:void( (function(){' +
'document.open();' +
// Support for custom document.domain.
// Strip comments and replace parent with window.opener in the function body.
@@ -73,6 +75,8 @@
'document.close();' +
'window.opener._cke_htmlToLoad = null;' +
'})() )';
// For IE we should use window.location rather than setting url in window.open. (#11146)
sOpenUrl = '';
}

// With Firefox only, we need to open a special preview page, so
@@ -85,6 +89,9 @@
var oWindow = window.open( sOpenUrl, null, 'toolbar=yes,location=no,status=yes,menubar=yes,scrollbars=yes,resizable=yes,width=' +
iWidth + ',height=' + iHeight + ',left=' + iLeft );

if ( CKEDITOR.env.ie )
oWindow.location = ieLocation;

if ( !CKEDITOR.env.ie && !CKEDITOR.env.gecko ) {
var doc = oWindow.document;
doc.open();

0 comments on commit 6e69ed5

Please sign in to comment.
You can’t perform that action at this time.