Ticket #3174: 3174_3.patch
File 3174_3.patch, 2.1 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 win.on( 'load', function( ev ) 120 { 121 if( CKEDITOR.env.ff2 ) 122 { 123 var i, l = this.css.length; 124 for ( i = 0; i < l; i++ ) { 125 doc.appendStyleSheet( this.css[ i ] ); 126 } 127 } 128 // TODO: Examine stylesheet ready state instead of hard-coded timeout. 129 CKEDITOR.tools.setTimeout( function(){ 130 this.isLoaded = true; 131 if ( this.onLoad ) 132 this.onLoad(); 133 }, CKEDITOR.env.ff2? 100 : 0, this ); 134 }, 135 this); 136 117 137 // Initialize the IFRAME document body. 118 138 doc.$.open(); 119 139 doc.$.write( … … 120 140 '<!DOCTYPE html>' + 121 141 '<html>' + 122 142 '<head>' + 123 '<link type="text/css" rel=stylesheet href="' + this.css.join( '"><link type="text/css" rel="stylesheet" href="' ) + '">' + 143 // Styles loading come later for Firefox 2 144 ( !CKEDITOR.env.ff2? '<link type="text/css" rel=stylesheet href="' 145 + this.css.join( '"><link type="text/css" rel="stylesheet" href="' ) + '">' : '' )+ 124 146 '<style>.' + className + '_container{visibility:hidden}</style>' + 125 147 '</head>' + 126 148 '<body class="' + className + '_container cke_panel_frame" style="margin:0;padding:0">' + … … 127 149 '</body>' + 128 150 '<\/html>' ); 129 151 doc.$.close(); 130 131 var win = doc.getWindow(); 132 152 133 153 // Register the CKEDITOR global. 134 154 win.$.CKEDITOR = CKEDITOR; 135 155 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;