Ticket #3665: 3665.patch

File 3665.patch, 1.0 KB (added by Garry Yao, 14 years ago)
  • _source/core/htmlparser/fragment.js

     
    116116                                        currentNode = savedCurrent;
    117117                        }
    118118
    119                         // Rtrim empty spaces on block end boundary. (#3585)
    120119                        if ( element._.isBlockLike )
    121120                        {
    122 
    123121                                var length = element.children.length,
    124122                                        lastChild = element.children[ length - 1 ],
    125123                                        text;
    126124                                if ( lastChild && lastChild.type == CKEDITOR.NODE_TEXT )
    127125                                {
    128                                         if ( !( text = CKEDITOR.tools.rtrim( lastChild.value ) ) )
     126                                        // 1. IE incorrectly report ' ' inside empty block,
     127                                        // trim it here.
     128                                        // 2. Rtrim empty spaces on block end boundary. (#3585)
     129                                        if ( CKEDITOR.env.ie && length == 1 && lastChild.value == ' '
     130                                                 || !( text = CKEDITOR.tools.rtrim( lastChild.value ) ) )
    129131                                                element.children.length = length -1;
    130132                                        else
    131133                                                lastChild.value = text;
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy