Ticket #4058: 4058.patch

File 4058.patch, 2.0 KB (added by Artur Formella, 15 years ago)
  • _source/plugins/wysiwygarea/plugin.js

     
    216216                                                iframe,
    217217                                                isLoadingData,
    218218                                                isPendingFocus,
     219                                                blockReady = false,
    219220                                                fireMode;
    220221
    221222                                        // Support for custom document.domain in IE.
     
    262263
    263264                                                if ( CKEDITOR.env.gecko )
    264265                                                {
     266                                                        // Make sure it will be loaded properly ( #4058 ).
     267                                                        var onIframeLoad = function( data )
     268                                                        {
     269                                                                iframe.removeListener( 'load', onIframeLoad );
     270                                                                if ( !blockReady )
     271                                                                        contentDomReady( data.sender.$.contentWindow );
     272                                                        };
     273                                                        iframe.on( 'load', onIframeLoad );
     274
    265275                                                        // Accessibility attributes for Firefox.
    266276                                                        mainElement.setAttributes(
    267277                                                                {
     
    305315                                                '<script id="cke_actscrpt" type="text/javascript">' +
    306316                                                        'window.onload = function()' +
    307317                                                        '{' +
    308                                                                 // Remove this script from the DOM.
    309                                                                 'var s = document.getElementById( "cke_actscrpt" );' +
    310                                                                 's.parentNode.removeChild( s );' +
    311 
    312318                                                                // Call the temporary function for the editing
    313319                                                                // boostrap.
    314320                                                                'window.parent.CKEDITOR._["contentDomReady' + editor.name + '"]( window );' +
     
    318324                                        // Editing area bootstrap code.
    319325                                        var contentDomReady = function( domWindow )
    320326                                        {
    321                                                 delete CKEDITOR._[ 'contentDomReady' + editor.name ];
     327                                                blockReady = true;
    322328
    323329                                                var domDocument = domWindow.document,
    324330                                                        body = domDocument.body;
    325331
     332                                                // Remove this script from the DOM.
     333                                                var script = domDocument.getElementById( "cke_actscrpt" );
     334                                                script.parentNode.removeChild( script );
     335
     336                                                delete CKEDITOR._[ 'contentDomReady' + editor.name ];
     337
    326338                                                body.spellcheck = !editor.config.disableNativeSpellChecker;
    327339
    328340                                                if ( CKEDITOR.env.ie )
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy