Ticket #10165: 0001-Simplified-fix-for-Access-denied-error-in-IE9-10-whe.patch

File 0001-Simplified-fix-for-Access-denied-error-in-IE9-10-whe.patch, 2.0 KB (added by Olek Nowodziński, 11 years ago)
  • plugins/wysiwygarea/plugin.js

    From 74773ae30dc63727fc4a4742549907343fd0cd2e Mon Sep 17 00:00:00 2001
    From: Aleksander Nowodzinski <a.nowodzinski@cksource.com>
    Date: Thu, 7 Mar 2013 09:55:20 +0100
    Subject: [PATCH] Simplified fix for Access denied error in IE9-10 when running
     in subdomain and document.domain changed.
    
    ---
     plugins/wysiwygarea/plugin.js | 18 +++++++++---------
     1 file changed, 9 insertions(+), 9 deletions(-)
    
    diff --git a/plugins/wysiwygarea/plugin.js b/plugins/wysiwygarea/plugin.js
    index 4516568..2782c9b 100644
    a b  
    1212        CKEDITOR.plugins.add( 'wysiwygarea', {
    1313                init: function( editor ) {
    1414                        editor.addMode( 'wysiwyg', function( callback ) {
    15                                 var iframe = CKEDITOR.document.createElement( 'iframe' );
    16                                 iframe.setStyles({ width: '100%', height: '100%' } );
    17                                 iframe.addClass( 'cke_wysiwyg_frame cke_reset' );
    18 
    19                                 var contentSpace = editor.ui.space( 'contents' );
    20                                 contentSpace.append( iframe );
    21 
    2215                                var src = 'document.open();' +
    23                                         // The document domain must be set any time we
     16                                // The document domain must be set any time we
    2417                                // call document.open().
    2518                                ( isCustomDomain ? ( 'document.domain="' + document.domain + '";' ) : '' ) +
    2619                                        'document.close();';
     
    3225                                        :
    3326                                        '';
    3427
     28                                var iframe = CKEDITOR.dom.element.createFromHtml( '<iframe src="' + src + '"></iframe>', CKEDITOR.document );
     29
     30                                iframe.setStyles( { width: '100%', height: '100%' } );
     31                                iframe.addClass( 'cke_wysiwyg_frame cke_reset' );
     32
     33                                var contentSpace = editor.ui.space( 'contents' );
     34                                contentSpace.append( iframe );
     35
    3536                                // Asynchronous iframe loading is only required in IE>8 and Gecko (other reasons probably).
    3637                                // Do not use it on WebKit as it'll break the browser-back navigation.
    3738                                var useOnloadEvent = CKEDITOR.env.ie || CKEDITOR.env.gecko;
     
    5960                                        frameBorder: 0,
    6061                                        'aria-describedby' : labelId,
    6162                                        title: frameLabel,
    62                                         src: src,
    6363                                        tabIndex: editor.tabIndex,
    6464                                        allowTransparency: 'true'
    6565                                });
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy