Ticket #5559: 5559_5.patch
File 5559_5.patch, 2.1 KB (added by , 14 years ago) |
---|
-
_source/plugins/wysiwygarea/plugin.js
289 289 if ( iframe ) 290 290 iframe.remove(); 291 291 292 frameLoaded = 0;293 292 294 293 var setDataFn = !CKEDITOR.env.gecko && CKEDITOR.tools.addFunction( function( doc ) 295 294 { … … 304 303 // call document.open(). 305 304 ( isCustomDomain ? ( 'document.domain="' + document.domain + '";' ) : '' ) + 306 305 307 ( ( 'parent.CKEDITOR.tools.callFunction(' + setDataFn + ',document);' ) ) +308 309 306 'document.close();'; 310 307 311 308 iframe = CKEDITOR.dom.element.createFromHtml( '<iframe' + 312 309 ' style="width:100%;height:100%"' + 313 310 ' frameBorder="0"' + 314 311 ' title="' + frameLabel + '"' + 315 // With FF, the 'src' attribute should be left empty to 312 // With IE, the custom domain has to be taken care at first, 313 // for other browers, the 'src' attribute should be left empty to 316 314 // trigger iframe's 'load' event. 317 ' src="' + ( CKEDITOR.env. gecko ? '' : 'javascript:void(function(){' + encodeURIComponent( srcScript ) + '}())' ) + '"' +315 ' src="' + ( CKEDITOR.env.ie ? 'javascript:void(function(){' + encodeURIComponent( srcScript ) + '}())' : '' ) + '"' + 318 316 ' tabIndex="' + editor.tabIndex + '"' + 319 317 ' allowTransparency="true"' + 320 318 '></iframe>' ); 321 319 322 320 // With FF, it's better to load the data on iframe.load. (#3894,#4058) 323 CKEDITOR.env.gecko &&iframe.on( 'load', function( ev )321 iframe.on( 'load', function( ev ) 324 322 { 323 frameLoaded = 1; 325 324 ev.removeListener(); 326 325 327 326 var doc = iframe.getFrameDocument().$; … … 345 344 // Editing area bootstrap code. 346 345 var contentDomReady = function( domWindow ) 347 346 { 348 if ( frameLoaded )347 if ( !frameLoaded ) 349 348 return; 350 frameLoaded = 1;349 frameLoaded = 0; 351 350 352 351 editor.fire( 'ariaWidget', iframe ); 353 352