Ticket #4642: 4642.patch

File 4642.patch, 1015 bytes (added by Alfonso Martínez de Lizarrondo, 14 years ago)

Proposed patch

  • editor/_source/internals/fckxhtml_ie.js

     
    116116                return ;
    117117
    118118        // Clear the _fckhtmljob attribute.
    119         if ( typeof node._fckxhtmljob !== 'undefined' )
    120                 node.removeAttribute('_fckxhtmljob') ;
     119        if ( typeof node._fckxhtmljob == 'undefined' && node.tagName !== 'BODY')
     120                return;
    121121
     122        node.removeAttribute('_fckxhtmljob') ;
    122123        // Recurse upon child nodes.
    123124        if ( node.hasChildNodes() )
    124125        {
    125126                var childNodes = node.childNodes ;
    126127                for ( var i = childNodes.length - 1 ; i >= 0 ; i-- )
    127                         FCKXHtml._RemoveXHtmlJobProperties( childNodes.item(i) ) ;
     128                {
     129                        var child = childNodes[i];
     130                        // Funny IE. #4642. It say that it has child nodes but their parent is not this node. Skip them
     131                        if (child.parentNode == node)
     132                                FCKXHtml._RemoveXHtmlJobProperties( child ) ;
     133                }
    128134        }
    129135}
    130136
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy