Ticket #4032: 4032.patch

File 4032.patch, 3.4 KB (added by Garry Yao, 15 years ago)
  • _source/plugins/richcombo/plugin.js

     
    4949                {
    5050                        panelDefinition : panelDefinition,
    5151                        items : {},
    52                         state : CKEDITOR.TRISTATE_OFF
     52                        state : CKEDITOR.TRISTATE_OFF,
     53                        value : ''
    5354                };
    5455        },
    5556
     
    279280
    280281                setValue : function( value, text )
    281282                {
    282                         this._.value = value;
    283 
    284                         var textElement = this.document.getById( 'cke_' + this.id + '_text' );
     283                        if ( this._.value != value )
     284                        {
     285                                var textElement = this.document.getById( 'cke_' + this.id + '_text' );
    285286
    286                         if ( !value )
    287                         {
    288                                 text = this.label;
    289                                 textElement.addClass( 'cke_inline_label' );
    290                         }
    291                         else
    292                                 textElement.removeClass( 'cke_inline_label' );
    293                         textElement.setHtml( typeof text != 'undefined' ? text : value );
     287                                if ( !value )
     288                                {
     289                                        text = this.label;
     290                                        textElement.addClass( 'cke_inline_label' );
     291                                }
     292                                else
     293                                        textElement.removeClass( 'cke_inline_label' );
     294                                // IE8 fluctuates the rendering layout when update inner HTML,
     295                                // do it off the DOM.(#4032)
     296                                if ( CKEDITOR.env.ie8 )
     297                                {
     298                                        var parent = textElement.getParent();
     299                                        textElement.remove();
     300                                }
     301                                textElement.setHtml( typeof text != 'undefined' ? text : value );
     302                                if ( CKEDITOR.env.ie8 )
     303                                        parent.append( textElement );
     304                        }
     305
     306                        this._.value = value;
    294307                },
    295308
    296309                getValue : function()
  • _source/plugins/button/plugin.js

     
    199199                {
    200200                        element.setState( state );
    201201
    202                         var htmlTitle = this.title,
    203                                 unavailable = this._.editor.lang.common.unavailable,
    204                                 labelElement = element.getChild( 1 );
     202                        if ( this._.state == CKEDITOR.TRISTATE_DISABLED
     203                                 || state == CKEDITOR.TRISTATE_DISABLED )
     204                        {
     205                                var htmlTitle = this.title,
     206                                        unavailable = this._.editor.lang.common.unavailable,
     207                                        labelElement = element.getChild( 1 );
    205208
    206                         if ( state == CKEDITOR.TRISTATE_DISABLED )
    207                                 htmlTitle = unavailable.replace( '%1', this.title );
     209                                if ( state == CKEDITOR.TRISTATE_DISABLED )
     210                                        htmlTitle = unavailable.replace( '%1', this.title );
    208211
    209                         labelElement.setHtml( htmlTitle );
    210                 }
     212                                // IE8 fluctuates the rendering layout when update inner HTML,
     213                                // do it off the DOM.(#4032)
     214                                if ( CKEDITOR.env.ie8 )
     215                                        labelElement.remove();
     216                                labelElement.setHtml( htmlTitle );
     217                                if ( CKEDITOR.env.ie8 )
     218                                        element.append( labelElement );
     219                        }
     220                }
    211221
    212222                this._.state = state;
    213223        }
  • CHANGES.html

     
    162162                        ckeditor2.html test case.</li>
    163163                <li><a href="http://dev.fckeditor.net/ticket/3989">#3989</a> : Host page horizontal scrolling a lot when on having righ-to-left direction.</li>
    164164                <li><a href="http://dev.fckeditor.net/ticket/4001">#4001</a> : Create link around existing image result incorrect.</li>
     165                <li><a href="http://dev.fckeditor.net/ticket/4032">#4032</a> : [IE8] Fixed toolbar height fluctuating when document is focused.</li>
    165166        </ul>
    166167        <h3>
    167168                CKEditor 3.0 RC</h3>
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy