Ticket #4058: 4058_2.patch

File 4058_2.patch, 2.8 KB (added by Garry Yao, 15 years ago)
  • _source/plugins/wysiwygarea/plugin.js

     
    216216                                                iframe,
    217217                                                isLoadingData,
    218218                                                isPendingFocus,
     219                                                frameLoaded,
    219220                                                fireMode;
    220221
    221222                                        // Support for custom document.domain in IE.
     
    229230                                                if ( fieldset )
    230231                                                        fieldset.remove();
    231232
     233                                                frameLoaded = 0;
    232234                                                // The document domain must be set within the src
    233235                                                // attribute;
    234236                                                // Defer the script execution until iframe
     
    262264
    263265                                                if ( CKEDITOR.env.gecko )
    264266                                                {
     267                                                        // Double checking the iframe will be loaded properly(#4058).
     268                                                        iframe.on( 'load', function( ev )
     269                                                        {
     270                                                                ev.removeListener();
     271                                                                contentDomReady( iframe.$.contentWindow );
     272                                                        } );
     273
    265274                                                        // Accessibility attributes for Firefox.
    266275                                                        mainElement.setAttributes(
    267276                                                                {
     
    307316                                                '<script id="cke_actscrpt" type="text/javascript">' +
    308317                                                        'window.onload = function()' +
    309318                                                        '{' +
    310                                                                 // Remove this script from the DOM.
    311                                                                 'var s = document.getElementById( "cke_actscrpt" );' +
    312                                                                 's.parentNode.removeChild( s );' +
    313 
    314319                                                                // Call the temporary function for the editing
    315320                                                                // boostrap.
    316321                                                                'window.parent.CKEDITOR._["contentDomReady' + editor.name + '"]( window );' +
     
    320325                                        // Editing area bootstrap code.
    321326                                        var contentDomReady = function( domWindow )
    322327                                        {
    323                                                 delete CKEDITOR._[ 'contentDomReady' + editor.name ];
     328                                                if ( frameLoaded )
     329                                                        return;
     330                                                else
     331                                                        frameLoaded = 1;
    324332
    325333                                                var domDocument = domWindow.document,
    326334                                                        body = domDocument.body;
    327335
     336                                                // Remove this script from the DOM.
     337                                                var script = domDocument.getElementById( "cke_actscrpt" );
     338                                                script.parentNode.removeChild( script );
     339
     340                                                delete CKEDITOR._[ 'contentDomReady' + editor.name ];
     341
    328342                                                body.spellcheck = !editor.config.disableNativeSpellChecker;
    329343
    330344                                                if ( CKEDITOR.env.ie )
  • CHANGES.html

     
    197197                <li><a href="http://dev.fckeditor.net/ticket/3622">#3622</a> : The toolbar in the v2
    198198                        skin was wrapping improperly in some languages.</li>
    199199                <li><a href="http://dev.fckeditor.net/ticket/4119">#4119</a> : Unable to edit image link with image dialog.</li>
     200                <li><a href="http://dev.fckeditor.net/ticket/4058">#4058</a> : [FF3.5] wysiwyg mode is sometimes not been activated.</li>
    200201        </ul>
    201202        <h3>
    202203                CKEditor 3.0 RC</h3>
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy