Ticket #4455: 4455.patch
File 4455.patch, 2.0 KB (added by , 14 years ago) |
---|
-
_source/plugins/wysiwygarea/plugin.js
333 333 // enables editing, and makes some 334 334 var activationScript = 335 335 '<script id="cke_actscrpt" type="text/javascript">' + 336 // Enable editing mode as early as possible to not 337 // be blocked by e.g. image loading. (#4455) 338 'document.body.contentEditable = true;' + 336 339 'window.onload = function()' + 337 340 '{' + 338 341 // Call the temporary function for the editing … … 368 371 // Disable and re-enable the body to avoid IE from 369 372 // taking the editing focus at startup. (#141 / #523) 370 373 body.disabled = true; 371 body.contentEditable = true;372 374 body.removeAttribute( 'disabled' ); 373 375 } 374 else 376 // Firefox require design-mode been turned on to make 377 // the cursor blinking before editing frame window gain 378 // keyboard focus. 379 else if ( CKEDITOR.env.gecko ) { 375 380 domDocument.designMode = 'on'; 376 381 } 382 377 383 // IE, Opera and Safari may not support it and throw 378 384 // errors. 379 385 try { domDocument.execCommand( 'enableObjectResizing', false, !editor.config.disableObjectResizing ) ; } catch(e) {} … … 417 423 focusTarget.on( 'blur', function() 418 424 { 419 425 editor.focusManager.blur(); 426 427 if( CKEDITOR.env.gecko ) { 428 editor.document.$.designMode = 'on'; 429 } 420 430 }); 421 431 422 432 focusTarget.on( 'focus', function() … … 448 458 } 449 459 450 460 editor.focusManager.focus(); 451 }); 461 462 463 if( CKEDITOR.env.gecko ) 464 setTimeout( function() 465 { 466 editor.document.$.designMode = 'off'; 467 }); 468 }); 452 469 453 470 var keystrokeHandler = editor.keystrokeHandler; 454 471 if ( keystrokeHandler )