Ticket #3174: 3174_2.patch
File 3174_2.patch, 2.2 KB (added by , 15 years ago) |
---|
-
_source/plugins/panel/plugin.js
114 114 115 115 var className = iframe.getParent().getParent().getAttribute( 'class' ); 116 116 117 var win = doc.getWindow(); 118 119 // Register the CKEDITOR global. 120 win.$.CKEDITOR = CKEDITOR; 121 122 win.on( 'load', function( ev ) 123 { 124 if( CKEDITOR.env.ff2 ) 125 { 126 var i, l = this.css.length; 127 for ( i = 0; i < l; i++ ) { 128 doc.appendStyleSheet( this.css[ i ] ); 129 } 130 } 131 // TODO: Examine stylesheet ready state instead of hard-coded timeout. 132 CKEDITOR.tools.setTimeout( function(){ 133 this.isLoaded = true; 134 if ( this.onLoad ) 135 this.onLoad(); 136 }, CKEDITOR.env.ff2? 100 : 0, this ); 137 }, 138 this); 139 117 140 // Initialize the IFRAME document body. 118 141 doc.$.open(); 119 142 doc.$.write( … … 120 143 '<!DOCTYPE html>' + 121 144 '<html>' + 122 145 '<head>' + 123 '<link type="text/css" rel=stylesheet href="' + this.css.join( '"><link type="text/css" rel="stylesheet" href="' ) + '">' + 146 // Styles loading come later for Firefox 2 147 ( !CKEDITOR.env.ff2? '<link type="text/css" rel=stylesheet href="' 148 + this.css.join( '"><link type="text/css" rel="stylesheet" href="' ) + '">' : '' )+ 124 149 '<style>.' + className + '_container{visibility:hidden}</style>' + 125 150 '</head>' + 126 151 '<body class="' + className + '_container cke_panel_frame" style="margin:0;padding:0">' + … … 128 153 '<\/html>' ); 129 154 doc.$.close(); 130 155 131 var win = doc.getWindow();132 133 // Register the CKEDITOR global.134 win.$.CKEDITOR = CKEDITOR;135 136 win.on( 'load', function( ev )137 {138 this.isLoaded = true;139 if ( this.onLoad )140 this.onLoad();141 },142 this);143 144 156 doc.on( 'keydown', function( evt ) 145 157 { 146 158 var keystroke = evt.data.getKeystroke(); … … 298 310 } 299 311 } 300 312 }); 313 314 // Firefox2.x version detect. 315 CKEDITOR.env.ff2 = CKEDITOR.env.gecko && CKEDITOR.env.version < 109000;