Ticket #3174: 3174_4.patch

File 3174_4.patch, 3.1 KB (added by Martin Kou, 16 years ago)
  • _source/plugins/floatpanel/plugin.js

     
    173173                                                        }
    174174
    175175                                                        if ( !CKEDITOR.env.gecko || panel.isLoaded )
    176                                                                 setHeight();
     176                                                        {
     177                                                                // IE7 needs some time (setting the delay to 0ms won't work) to refresh
     178                                                                // the scrollHeight. (#3174)
     179                                                                if ( CKEDITOR.env.ie && CKEDITOR.env.version >= 7 )
     180                                                                        setTimeout( setHeight, 50 );
     181                                                                else
     182                                                                        setHeight();
     183                                                        }
    177184                                                        else
    178185                                                                panel.onLoad = setHeight;
    179186                                                }
  • _source/plugins/panel/plugin.js

     
    131131                                        className = parentDiv.getParent().getAttribute( 'class' ),
    132132                                        doc = iframe.getFrameDocument();
    133133
     134                                var win = doc.getWindow();
     135
     136                                win.on( 'load', function( ev )
     137                                        {
     138                                                if( CKEDITOR.env.ff2 )
     139                                                {
     140                                                        for ( var i = 0 ; i < this.css.length ; i++ )
     141                                                                doc.appendStyleSheet( this.css[ i ] );
     142                                                }
     143
     144                                                // TODO: Examine stylesheet ready state instead of hard-coded timeout.
     145                                                CKEDITOR.tools.setTimeout( function()
     146                                                {
     147                                                        this.isLoaded = true;
     148                                                        if ( this.onLoad )
     149                                                                this.onLoad();
     150                                                }, CKEDITOR.env.ff2 ? 100 : 0, this );
     151                                        },
     152                                        this );
     153
    134154                                // Initialize the IFRAME document body.
    135155                                doc.$.open();
    136156
     
    142162                                        '<!DOCTYPE html>' +
    143163                                        '<html dir="' + dir + '" class="' + className + '_container">' +
    144164                                                '<head>' +
    145                                                         '<link type="text/css" rel=stylesheet href="' + this.css.join( '"><link type="text/css" rel="stylesheet" href="' ) + '">' +
     165                                                        // Styles loading come later for Firefox 2
     166                                                        ( !CKEDITOR.env.ff2 ? '<link type="text/css" rel=stylesheet href="'
     167                                                        + this.css.join( '"><link type="text/css" rel="stylesheet" href="' ) + '">' : '' )+
    146168                                                        '<style>.' + className + '_container{visibility:hidden}</style>' +
    147169                                                '</head>' +
    148170                                                '<body class="cke_' + dir + ' cke_panel_frame" style="margin:0;padding:0">' +
    149171                                                '</body>' +
    150172                                        '<\/html>' );
    151173                                doc.$.close();
    152 
    153                                 var win = doc.getWindow();
    154 
     174                               
    155175                                // Register the CKEDITOR global.
    156176                                win.$.CKEDITOR = CKEDITOR;
    157177
    158                                 win.on( 'load', function( ev )
    159                                         {
    160                                                 this.isLoaded = true;
    161                                                 if ( this.onLoad )
    162                                                         this.onLoad();
    163                                         },
    164                                         this);
    165 
    166178                                doc.on( 'keydown', function( evt )
    167179                                        {
    168180                                                var keystroke = evt.data.getKeystroke();
  • _source/core/env.js

     
    115115                                geckoRelease = geckoRelease[1].split( '.' );
    116116                                version = geckoRelease[0] * 10000 + ( geckoRelease[1] || 0 ) * 100 + ( geckoRelease[2] || 0 ) * 1;
    117117                        }
     118
     119                        env.ff2 = version < 109000;
    118120                }
    119121
    120122                // Opera 9.50+
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy