Ticket #5018: 5018_3.patch

File 5018_3.patch, 1.8 KB (added by Garry Yao, 14 years ago)
  • _source/plugins/styles/plugin.js

     
    937937                for ( var attName in attributes )
    938938                {
    939939                        // The 'class' element value must match (#1318).
    940                         if ( attName == 'class' && element.getAttribute( attName ) != attributes[ attName ] )
     940                        if ( ( attName == 'class' || style._.definition.unique ) && element.getAttribute( attName ) != attributes[ attName ] )
    941941                                continue;
    942942                        removeEmpty = element.hasAttribute( attName );
    943943                        element.removeAttribute( attName );
     
    945945
    946946                for ( var styleName in styles )
    947947                {
     948                        // Unique style insist on having full match. (#5018)
     949                        if ( style._.definition.unique
     950                                        && element.getStyle( styleName ) != styles[ styleName ] )
     951                                continue;
     952
    948953                        removeEmpty = removeEmpty || !!element.getStyle( styleName );
    949954                        element.removeStyle( styleName );
    950955                }
  • _source/plugins/find/dialogs/find.js

     
    6767
    6868        var findDialog = function( editor, startupPage )
    6969        {
    70                 // Style object for highlights.
    71                 var highlightStyle = new CKEDITOR.style( editor.config.find_highlight );
     70                // Style object for highlights, must be defined as unique style to avoid conflicting with ordinary text color styles. (#5018)
     71                var highlightStyle = new CKEDITOR.style( CKEDITOR.tools.extend( { unique : true },
     72                        editor.config.find_highlight ) );
    7273
    7374                /**
    7475                 * Iterator which walk through the specified range char by char. By
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy