Ticket #325: fix empty p.patch

File fix empty p.patch, 0.7 KB (added by alfonsoml, 3 years ago)

proposed patch

  • fckdomtools.js

     
    7878                                        if ( eChildNode.nodeName.toUpperCase() == 'BR' && ( ignoreEndBRs || eChildNode.getAttribute( 'type', 2 ) == '_moz' ) ) 
    7979                                        { 
    8080                                                node.removeChild( eChildNode ) ; 
     81 
     82                                                // If the node now is empty then append a   to visually keep the same appearance (#325) 
     83                                                if ( node.lastChild === null && FCKConfig.FillEmptyBlocks ) 
     84                                                        node.appendChild( FCKTools.GetElementDocument( node ).createTextNode( String.fromCharCode(160) ) ); 
    8185                                                continue ; 
    8286                                        } 
    8387                                        break ;