Ticket #3812: 3812_2.patch

File 3812_2.patch, 4.6 KB (added by Martin Kou, 15 years ago)
  • _source/plugins/wysiwygarea/plugin.js

     
    210210                        editor.on( 'editingBlockReady', function()
    211211                                {
    212212                                        var mainElement,
     213                                                fieldset,
    213214                                                iframe,
    214215                                                isLoadingData,
    215216                                                isPendingFocus,
     
    223224                                        {
    224225                                                if ( iframe )
    225226                                                        iframe.remove();
     227                                                if ( fieldset )
     228                                                        fieldset.remove();
    226229
    227230                                                iframe = new CKEDITOR.dom.element( 'iframe' )
    228231                                                        .setAttributes({
     
    233236                                                                width : '100%',
    234237                                                                height : '100%' });
    235238
    236                                                 if ( CKEDITOR.env.ie )
    237                                                 {
    238                                                         if ( isCustomDomain )
    239                                                         {
    240                                                                 // The document domain must be set within the src
    241                                                                 // attribute.
    242                                                                 iframe.setAttribute( 'src',
    243                                                                         'javascript:void( (function(){' +
    244                                                                                 'document.open();' +
    245                                                                                 'document.domain="' + document.domain + '";' +
    246                                                                                 'document.write( window.parent._cke_htmlToLoad_' + editor.name + ' );' +
    247                                                                                 'document.close();' +
    248                                                                                 'window.parent._cke_htmlToLoad_' + editor.name + ' = null;' +
    249                                                                         '})() )' );
    250                                                         }
    251                                                         else
    252                                                                 // To avoid HTTPS warnings.
    253                                                                 iframe.setAttribute( 'src', 'javascript:void(0)' );
    254                                                 }
     239                                                // The document domain must be set within the src
     240                                                // attribute.
     241                                                iframe.setAttribute( 'src',
     242                                                        'javascript:void( (function(){' +
     243                                                                'document.open();' +
     244                                                                ( CKEDITOR.env.ie && isCustomDomain ? 'document.domain="' + document.domain + '";' : '' ) +
     245                                                                'document.write( window.parent._cke_htmlToLoad_' + editor.name + ' );' +
     246                                                                'document.close();' +
     247                                                                'window.parent._cke_htmlToLoad_' + editor.name + ' = null;' +
     248                                                        '})() )' );
    255249
    256250                                                var accTitle = editor.lang.editorTitle.replace( '%1', editor.name );
    257251
     
    277271                                                else if ( CKEDITOR.env.ie )
    278272                                                {
    279273                                                        // Accessibility label for IE.
    280                                                         var fieldset = CKEDITOR.dom.element.createFromHtml(
     274                                                        fieldset = CKEDITOR.dom.element.createFromHtml(
    281275                                                                '<fieldset style="height:100%' +
    282276                                                                        ( CKEDITOR.env.quirks ? ';position:relative' : '' ) +
    283277                                                                '">' +
     
    444438                                                                if ( CKEDITOR.env.ie && ( CKEDITOR.env.quirks || CKEDITOR.env.version < 8 ) )
    445439                                                                        holderElement.setStyle( 'position', 'relative' );
    446440
    447                                                                 // Create the iframe at load for all browsers
    448                                                                 // except FF and IE with custom domain.
    449                                                                 if ( !isCustomDomain || !CKEDITOR.env.gecko )
    450                                                                         createIFrame();
    451 
    452441                                                                // The editor data "may be dirty" after this
    453442                                                                // point.
    454443                                                                editor.mayBeDirty = true;
     
    486475                                                                        '</html>' +
    487476                                                                        activationScript;
    488477
    489                                                                 // For custom domain in IE, set the global variable
    490                                                                 // that will temporarily hold the editor data. This
    491                                                                 // reference will be used in the ifram src.
    492                                                                 if ( isCustomDomain )
    493                                                                         window[ '_cke_htmlToLoad_' + editor.name ] = data;
    494 
     478                                                                window[ '_cke_htmlToLoad_' + editor.name ] = data;
    495479                                                                CKEDITOR._[ 'contentDomReady' + editor.name ] = contentDomReady;
    496 
    497                                                                 // We need to recreate the iframe in FF for every
    498                                                                 // data load, otherwise the following spellcheck
    499                                                                 // and execCommand features will be active only for
    500                                                                 // the first time.
    501                                                                 // The same is valid for IE with custom domain,
    502                                                                 // because the iframe src must be reset every time.
    503                                                                 if ( isCustomDomain || CKEDITOR.env.gecko )
    504                                                                         createIFrame();
    505 
    506                                                                 // For custom domain in IE, the data loading is
    507                                                                 // done through the src attribute of the iframe.
    508                                                                 if ( !isCustomDomain )
    509                                                                 {
    510                                                                         var doc = iframe.$.contentWindow.document;
    511                                                                         doc.open();
    512                                                                         doc.write( data );
    513                                                                         doc.close();
    514                                                                 }
     480                                                                createIFrame();
    515481                                                        },
    516482
    517483                                                        getData : function()
  • CHANGES.html

     
    5555                <li><a href="http://dev.fckeditor.net/ticket/3820">#3820</a> : Fixed an issue in
    5656                        bullet list command in which a list created at the bottom of another gets merged to the top.
    5757                        </li>
     58                <li><a href="http://dev.fckeditor.net/ticket/3812">#3812</a> : Fixed an issue in which the editor
     59                        may show up empty or uneditable in IE7, 8 and Firefox 3.</li>
    5860        </ul>
    5961        <h3>
    6062                CKEditor 3.0 RC</h3>
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy