﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
1474	null errors reloading the page in IE	Alfonso Martínez de Lizarrondo		"Add a smiley to the content in IE 6 and now try to reload the page, a list of errors saying that something is null will show.

This patch (it's missing the reference to this bug number as it still doesn't exists) should take care of them, but maybe there's something else that can be done:
{{{
#!patch

Index: classes/fckspecialcombo.js
===================================================================
--- classes/fckspecialcombo.js	(revision 1044)
+++ classes/fckspecialcombo.js	(working copy)
@@ -192,7 +192,9 @@
 {
 	this.Enabled = isEnabled ;
 
-	this._OuterTable.className = isEnabled ? '' : 'SC_FieldDisabled' ;
+	// In IE it can happen when the page is reloaded that _OuterTable is null, so check its existence
+	if ( this._OuterTable )
+		this._OuterTable.className = isEnabled ? '' : 'SC_FieldDisabled' ;
 }
 
 FCKSpecialCombo.prototype.Create = function( targetElement )
Index: classes/fcktoolbarbuttonui.js
===================================================================
--- classes/fcktoolbarbuttonui.js	(revision 1044)
+++ classes/fcktoolbarbuttonui.js	(working copy)
@@ -127,6 +127,10 @@
 
 	var e = this.MainElement ;
 
+	// In IE it can happen when the page is reloaded that MainElement is null, so exit here
+	if ( !e )
+		return ;
+
 	switch ( parseInt( newState, 10 ) )
 	{
 		case FCK_TRISTATE_OFF :
Index: internals/fckdomtools.js
===================================================================
--- internals/fckdomtools.js	(revision 1044)
+++ internals/fckdomtools.js	(working copy)
@@ -380,6 +380,10 @@
 
 	EnforcePaddingNode : function( doc, tagName )
 	{
+		// In IE it can happen when the page is reloaded that doc or doc.body is null, so exit here
+		if ( !doc || !doc.body )
+			return ;
+
 		this.CheckAndRemovePaddingNode( doc, tagName, true ) ;
 		if ( doc.body.lastChild && ( doc.body.lastChild.nodeType != 1
 				|| doc.body.lastChild.tagName.toLowerCase() == tagName.toLowerCase() ) )


}}}"	Bug	closed	Normal	FCKeditor 2.5	General	FCKeditor 2.5 Beta	fixed	Confirmed IE	
