Index: /FCKeditor/trunk/editor/_source/internals/fck_gecko.js
===================================================================
--- /FCKeditor/trunk/editor/_source/internals/fck_gecko.js	(revision 655)
+++ /FCKeditor/trunk/editor/_source/internals/fck_gecko.js	(revision 656)
@@ -188,4 +188,16 @@
 	}
 
+	this._ExecCheckEmptyBlock = function()
+	{
+		var emptyBlockNode = FCK.EditorDocument.body.firstChild ;
+		if ( ! emptyBlockNode || emptyBlockNode.nodeType != 1 )
+			return ;
+		if ( ! FCKListsLib.NonEmptyBlockElements[emptyBlockNode.tagName.toLowerCase()] )
+			return ;
+		if ( emptyBlockNode.firstChild )
+			return ;
+		FCKTools.AppendBogusBr( emptyBlockNode ) ;
+	}
+
 	this.ExecOnSelectionChangeTimer = function()
 	{
@@ -225,7 +237,10 @@
 	}
 
-	// Kludge for buggy Gecko caret positioning logic (Bug #393)
+	// Kludge for buggy Gecko caret positioning logic (Bug #393 and #1056)
 	if ( FCKBrowserInfo.IsGecko )
+	{
 		this.EditorDocument.addEventListener( 'keypress', this._ExecCheckCaret, false ) ;
+		this.AttachToOnSelectionChange( this._ExecCheckEmptyBlock ) ;
+	}
 
 	// Reset the context menu.
Index: /FCKeditor/trunk/editor/_source/internals/fckdomtools.js
===================================================================
--- /FCKeditor/trunk/editor/_source/internals/fckdomtools.js	(revision 655)
+++ /FCKeditor/trunk/editor/_source/internals/fckdomtools.js	(revision 656)
@@ -330,5 +330,6 @@
 		if ( doc.body.childNodes.length == 1 
 				&& doc.body.firstChild.nodeType == 1
-				&& doc.body.firstChild.getAttribute( '_moz_dirty' ) != null )
+				&& ( doc.body.firstChild.getAttribute( '_moz_dirty' ) != null 
+					|| doc.body.firstChild.getAttribute( 'type' ) == '_moz' ) )
 			doc.body.replaceChild( node, doc.body.firstChild ) ;
 		else
@@ -353,8 +354,9 @@
 		}
 
-		// Now we're sure the padding node exists, and it is unchanged, remove it.
+		// Now we're sure the padding node exists, and it is unchanged, and it isn't the only node in doc.body, remove it.
 		if ( !dontRemove )
 		{
-			paddingNode.parentNode.removeChild( paddingNode ) ;
+			if ( paddingNode.parentNode.childNodes.length > 1 )
+				paddingNode.parentNode.removeChild( paddingNode ) ;
 			this.PaddingNode = null ;
 		}
