Index: /CKEditor/trunk/CHANGES.html
===================================================================
--- /CKEditor/trunk/CHANGES.html (revision 3991)
+++ /CKEditor/trunk/CHANGES.html (revision 3992)
@@ -199,4 +199,5 @@
skin was wrapping improperly in some languages.
#4119 : Unable to edit image link with image dialog.
+ #4058 : [FF] wysiwyg mode is sometimes not been activated.
Index: /CKEditor/trunk/_source/plugins/wysiwygarea/plugin.js
===================================================================
--- /CKEditor/trunk/_source/plugins/wysiwygarea/plugin.js (revision 3991)
+++ /CKEditor/trunk/_source/plugins/wysiwygarea/plugin.js (revision 3992)
@@ -217,4 +217,5 @@
isLoadingData,
isPendingFocus,
+ frameLoaded,
fireMode;
@@ -230,4 +231,5 @@
fieldset.remove();
+ frameLoaded = 0;
// The document domain must be set within the src
// attribute;
@@ -263,4 +265,11 @@
if ( CKEDITOR.env.gecko )
{
+ // Double checking the iframe will be loaded properly(#4058).
+ iframe.on( 'load', function( ev )
+ {
+ ev.removeListener();
+ contentDomReady( iframe.$.contentWindow );
+ } );
+
// Accessibility attributes for Firefox.
mainElement.setAttributes(
@@ -308,8 +317,4 @@
'window.onload = function()' +
'{' +
- // Remove this script from the DOM.
- 'var s = document.getElementById( "cke_actscrpt" );' +
- 's.parentNode.removeChild( s );' +
-
// Call the temporary function for the editing
// boostrap.
@@ -321,8 +326,17 @@
var contentDomReady = function( domWindow )
{
- delete CKEDITOR._[ 'contentDomReady' + editor.name ];
+ if ( frameLoaded )
+ return;
+
+ frameLoaded = 1;
var domDocument = domWindow.document,
body = domDocument.body;
+
+ // Remove this script from the DOM.
+ var script = domDocument.getElementById( "cke_actscrpt" );
+ script.parentNode.removeChild( script );
+
+ delete CKEDITOR._[ 'contentDomReady' + editor.name ];
body.spellcheck = !editor.config.disableNativeSpellChecker;