Ticket #3879: 3879.patch

File 3879.patch, 2.8 KB (added by Tobiasz Cudnik, 15 years ago)
  • CHANGES.html

     
    9393                <li><a href="http://dev.fckeditor.net/ticket/3639">#3639</a> : Button size was inconsistent.</li>
    9494                <li><a href="http://dev.fckeditor.net/ticket/3874">#3874</a> : Paste as plain text in Safari loosing lines.</li>
    9595                <li><a href="http://dev.fckeditor.net/ticket/3849">#3849</a> : Fixed IE8 crashes when applying lists and indenting.</li>
     96                <li><a href="http://dev.fckeditor.net/ticket/3879">#3879</a> : Color button panel was incorrect size on first open in webkit.</li>
    9697        </ul>
    9798        <h3>
    9899                CKEditor 3.0 RC</h3>
  • _source/plugins/floatpanel/plugin.js

     
    198198                                                        {
    199199                                                                var target = element.getFirst();
    200200                                                                var height = block.element.$.scrollHeight;
     201                                                                var firstChild;
    201202
    202                                                                 // Account for extra height needed due to IE quirks box model bug:
    203                                                                 // http://en.wikipedia.org/wiki/Internet_Explorer_box_model_bug
    204                                                                 // (#3426)
    205                                                                 if ( CKEDITOR.env.ie && CKEDITOR.env.quirks && height > 0 )
    206                                                                         height += ( target.$.offsetHeight || 0 ) - ( target.$.clientHeight || 0 );
     203                                                                // Delay height determination on webkit until first child (if any) will have a height. (#3879)
     204                                                                if ( CKEDITOR.env.webkit && ( firstChild = block.element.getChild( 0 ) ) && !firstChild.$.scrollHeight )
     205                                                                {
     206                                                                        var interval = setInterval( function()
     207                                                                                {
     208                                                                                        if ( firstChild.$.scrollHeight )
     209                                                                                        {
     210                                                                                                height = block.element.$.scrollHeight;
     211                                                                                                target.setStyle( 'height', height + 'px' );
     212                                                                                                clearInterval( interval );
     213                                                                                        }
     214                                                                                }, 100);
     215                                                                }
     216                                                                else
     217                                                                {
     218                                                                        // Account for extra height needed due to IE quirks box model bug:
     219                                                                        // http://en.wikipedia.org/wiki/Internet_Explorer_box_model_bug
     220                                                                        // (#3426)
     221                                                                        if ( CKEDITOR.env.ie && CKEDITOR.env.quirks && height > 0 )
     222                                                                                height += ( target.$.offsetHeight || 0 ) - ( target.$.clientHeight || 0 );
    207223
    208                                                                 target.setStyle( 'height', height + 'px' );
     224                                                                        target.setStyle( 'height', height + 'px' );
    209225
    210                                                                 // Fix IE < 8 visibility.
    211                                                                 panel._.currentBlock.element.setStyle( 'display', 'none' ).removeStyle( 'display' );
    212                                                         }
     226                                                                        // Fix IE < 8 visibility.
     227                                                                        panel._.currentBlock.element.setStyle( 'display', 'none' ).removeStyle( 'display' );
     228                                                                }
     229                                                        }
    213230
    214231                                                        if ( !CKEDITOR.env.gecko || panel.isLoaded )
    215232                                                        {
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy