Ticket #5368: 5368.patch

File 5368.patch, 1.4 KB (added by Alfonso Martínez de Lizarrondo, 14 years ago)

Proposed patch

  • _source/plugins/wysiwygarea/plugin.js

     
    254254                        if ( !CKEDITOR.env.ie )
    255255                                paddingBlock.appendBogus();
    256256                }
    257                
     257
    258258                range.select();
    259259                editor.selectionChange();
    260260        }
     
    677677                                                                data += activationScript;
    678678
    679679                                                                CKEDITOR._[ 'contentDomReady' + editor.name ] = contentDomReady;
     680
     681                                                                // The iframe is recreated on each call of setData, so we need to clear DOM objects
     682                                                                this.clearCustomData();
    680683                                                                createIFrame( data );
    681684                                                        },
    682685
     
    714717                                                                iframe.getFrameDocument().getBody().setHtml( data );
    715718                                                        },
    716719
    717                                                         unload : function( holderElement )
     720                                                        clearCustomData : function()
    718721                                                        {
     722                                                                if ( !editor.document )
     723                                                                        return;
     724
    719725                                                                editor.document.getDocumentElement().clearCustomData();
    720726                                                                editor.document.getBody().clearCustomData();
    721727
    722728                                                                editor.window.clearCustomData();
    723729                                                                editor.document.clearCustomData();
    724730
     731                                                                iframe.clearCustomData();
     732                                                        },
     733
     734                                                        unload : function( holderElement )
     735                                                        {
     736                                                                this.clearCustomData();
     737
    725738                                                                editor.window = editor.document = iframe = mainElement = isPendingFocus = null;
    726739
    727740                                                                editor.fire( 'contentDomUnload' );
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy