Ticket #3812: 3812_3.patch
File 3812_3.patch, 5.1 KB (added by , 15 years ago) |
---|
-
_source/plugins/wysiwygarea/plugin.js
210 210 editor.on( 'editingBlockReady', function() 211 211 { 212 212 var mainElement, 213 fieldset, 213 214 iframe, 214 215 isLoadingData, 215 216 isPendingFocus, … … 223 224 { 224 225 if ( iframe ) 225 226 iframe.remove(); 227 if ( fieldset ) 228 fieldset.remove(); 226 229 227 iframe = new CKEDITOR.dom.element( 'iframe' ) 228 .setAttributes({ 229 frameBorder : 0, 230 tabIndex : -1, 231 allowTransparency : true }) 232 .setStyles({ 233 width : '100%', 234 height : '100%' }); 230 // The document domain must be set within the src 231 // attribute. 232 var src = 'void( (function(){' + 233 'document.open();' + 234 ( CKEDITOR.env.ie && isCustomDomain ? 'document.domain="' + document.domain + '";' : '' ) + 235 'document.write( window.parent._cke_htmlToLoad_' + editor.name + ' );' + 236 'document.close();' + 237 'window.parent._cke_htmlToLoad_' + editor.name + ' = null;' + 238 '})() )'; 235 239 236 if ( CKEDITOR.env.ie ) 237 { 238 if ( isCustomDomain ) 239 { 240 // The document domain must be set within the src 241 // attribute. 242 iframe.setAttribute( 'src', 243 'javascript:void( (function(){' + 244 'document.open();' + 245 'document.domain="' + document.domain + '";' + 246 'document.write( window.parent._cke_htmlToLoad_' + editor.name + ' );' + 247 'document.close();' + 248 'window.parent._cke_htmlToLoad_' + editor.name + ' = null;' + 249 '})() )' ); 250 } 251 else 252 // To avoid HTTPS warnings. 253 iframe.setAttribute( 'src', 'javascript:void(0)' ); 254 } 240 // Loading via src attribute does not work in Opera. 241 if ( CKEDITOR.env.opera ) 242 src = 'void(0);'; 255 243 244 iframe = CKEDITOR.dom.element.createFromHtml( '<iframe' + 245 ' style="width:100%;height:100%"' + 246 ' frameBorder="0"' + 247 ' tabIndex="-1"' + 248 ' allowTransparency="true"' + 249 ' src="javascript:' + encodeURIComponent( src ) + '"' + 250 '></iframe>' ); 251 256 252 var accTitle = editor.lang.editorTitle.replace( '%1', editor.name ); 257 253 258 254 if ( CKEDITOR.env.gecko ) … … 277 273 else if ( CKEDITOR.env.ie ) 278 274 { 279 275 // Accessibility label for IE. 280 varfieldset = CKEDITOR.dom.element.createFromHtml(276 fieldset = CKEDITOR.dom.element.createFromHtml( 281 277 '<fieldset style="height:100%' + 282 278 ( CKEDITOR.env.quirks ? ';position:relative' : '' ) + 283 279 '">' + … … 444 440 if ( CKEDITOR.env.ie && ( CKEDITOR.env.quirks || CKEDITOR.env.version < 8 ) ) 445 441 holderElement.setStyle( 'position', 'relative' ); 446 442 447 // Create the iframe at load for all browsers448 // except FF and IE with custom domain.449 if ( !isCustomDomain || !CKEDITOR.env.gecko )450 createIFrame();451 452 443 // The editor data "may be dirty" after this 453 444 // point. 454 445 editor.mayBeDirty = true; … … 486 477 '</html>' + 487 478 activationScript; 488 479 489 // For custom domain in IE, set the global variable 490 // that will temporarily hold the editor data. This 491 // reference will be used in the ifram src. 492 if ( isCustomDomain ) 493 window[ '_cke_htmlToLoad_' + editor.name ] = data; 494 480 window[ '_cke_htmlToLoad_' + editor.name ] = data; 495 481 CKEDITOR._[ 'contentDomReady' + editor.name ] = contentDomReady; 482 createIFrame(); 496 483 497 // We need to recreate the iframe in FF for every 498 // data load, otherwise the following spellcheck 499 // and execCommand features will be active only for 500 // the first time. 501 // The same is valid for IE with custom domain, 502 // because the iframe src must be reset every time. 503 if ( isCustomDomain || CKEDITOR.env.gecko ) 504 createIFrame(); 505 506 // For custom domain in IE, the data loading is 507 // done through the src attribute of the iframe. 508 if ( !isCustomDomain ) 484 // Opera must use the old method for loading contents. 485 if ( CKEDITOR.env.opera ) 509 486 { 510 487 var doc = iframe.$.contentWindow.document; 511 488 doc.open(); -
CHANGES.html
60 60 <li><a href="http://dev.fckeditor.net/ticket/3835">#3835</a> : Element path is not refreshed 61 61 after click on 'newpage'; and safari is not putting focus on document also. 62 62 </li> 63 <li><a href="http://dev.fckeditor.net/ticket/3812">#3812</a> : Fixed an issue in which the editor 64 may show up empty or uneditable in IE7, 8 and Firefox 3.</li> 63 65 </ul> 64 66 <h3> 65 67 CKEditor 3.0 RC</h3>