Ticket #1503: 1503.patch

File 1503.patch, 1.3 KB (added by Alfonso Martínez de Lizarrondo, 16 years ago)

Proposed SVN patch

  • fckstyle.js

     
    231231                                                // Remove overrides defined to the same element name.
    232232                                                this._RemoveOverrides( pathElement, styleOverrides[ pathElementName ] ) ;
    233233
    234                                                 // Remove the element if no more attributes are available.
    235                                                 this._RemoveNoAttribElement( pathElement ) ;
     234                                                // Remove the element if no more attributes are available and it's an inline style element
     235                                                if ( this.GetType() == FCK_STYLE_INLINE)
     236                                                        this._RemoveNoAttribElement( pathElement ) ;
    236237                                        }
    237238                                }
    238239                                else if ( isBoundary )
     
    486487                switch ( this.GetType() )
    487488                {
    488489                        case FCK_STYLE_BLOCK :
    489                                 return this.CheckElementRemovable( elementPath.Block || elementPath.BlockLimit ) ;
     490                                return this.CheckElementRemovable( elementPath.Block || elementPath.BlockLimit, true ) ;
    490491
    491492                        case FCK_STYLE_INLINE :
    492493
     
    688689                        valueB = valueB.replace( /;$/, '' ).toLowerCase() ;
    689690                }
    690691
    691                 return ( valueA == valueB )
     692                // Return true if they match or if valueA is null and valueB is an empty string
     693                return ( valueA == valueB || ( valueA === null && valueB === '') )
    692694        },
    693695
    694696        GetFinalAttributeValue : function( attName )
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy