Ticket #3879: 3879_2.patch

File 3879_2.patch, 3.4 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/panel/plugin.js

     
    134134                                        langCode = parentDiv.getParent().getAttribute( 'lang' ),
    135135                                        doc = iframe.getFrameDocument();
    136136
     137                                var win = doc.getWindow();
     138
     139                                // Register the CKEDITOR global.
     140                                win.$.CKEDITOR = CKEDITOR;
     141
    137142                                // Initialize the IFRAME document body.
    138143                                doc.$.open();
    139144
     
    141146                                if ( CKEDITOR.env.isCustomDomain() )
    142147                                        doc.$.domain = document.domain;
    143148
     149                                var onLoad = CKEDITOR.tools.addFunction( CKEDITOR.tools.bind( function( ev )
     150                                        {
     151                                                this.isLoaded = true;
     152                                                if ( this.onLoad )
     153                                                        this.onLoad();
     154                                        }, this ) );
     155
    144156                                doc.$.write(
    145157                                        '<!DOCTYPE html>' +
    146158                                        '<html dir="' + dir + '" class="' + className + '_container" lang="' + langCode + '">' +
    147159                                                '<head>' +
    148160                                                        '<style>.' + className + '_container{visibility:hidden}</style>' +
    149161                                                '</head>' +
    150                                                 '<body class="cke_' + dir + ' cke_panel_frame ' + CKEDITOR.env.cssClass + '" style="margin:0;padding:0">' +
     162                                                '<body class="cke_' + dir + ' cke_panel_frame ' + CKEDITOR.env.cssClass + '" style="margin:0;padding:0"' +
     163                                                ' onload="( window.CKEDITOR || window.top.CKEDITOR ).tools.callFunction(' + onLoad + ');">' +
    151164                                                '</body>' +
    152165                                                // It looks strange, but for FF2, the styles must go
    153166                                                // after <body>, so it (body) becames immediatelly
     
    156169                                        '<\/html>' );
    157170                                doc.$.close();
    158171
    159                                 var win = doc.getWindow();
    160 
    161                                 // Register the CKEDITOR global.
    162                                 win.$.CKEDITOR = CKEDITOR;
    163 
    164                                 win.on( 'load', function( ev )
    165                                         {
    166                                                 this.isLoaded = true;
    167                                                 if ( this.onLoad )
    168                                                         this.onLoad();
    169                                         },
    170                                         this);
    171 
    172172                                doc.on( 'keydown', function( evt )
    173173                                        {
    174174                                                var keystroke = evt.data.getKeystroke();
  • _source/plugins/floatpanel/plugin.js

     
    211211                                                                panel._.currentBlock.element.setStyle( 'display', 'none' ).removeStyle( 'display' );
    212212                                                        }
    213213
    214                                                         if ( !CKEDITOR.env.gecko || panel.isLoaded )
    215                                                         {
    216                                                                 // IE7 needs some time (setting the delay to 0ms won't work) to refresh
    217                                                                 // the scrollHeight. (#3174)
    218                                                                 if ( CKEDITOR.env.ie && CKEDITOR.env.version >= 7 )
    219                                                                         setTimeout( setHeight, 50 );
    220                                                                 else
    221                                                                         setHeight();
    222                                                         }
     214                                                        if ( panel.isLoaded )
     215                                                                setHeight();
    223216                                                        else
    224217                                                                panel.onLoad = setHeight;
    225218                                                }
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy