Index: /CKEditor/trunk/CHANGES.html
===================================================================
--- /CKEditor/trunk/CHANGES.html	(revision 6457)
+++ /CKEditor/trunk/CHANGES.html	(revision 6458)
@@ -64,4 +64,5 @@
 		<li><a href="http://dev.ckeditor.com/ticket/5924">#5924</a> : Flash plugin now recognizes flash contents without an <code>embed</code> tag.</li>
 		<li><a href="http://dev.ckeditor.com/ticket/4475">#4475</a> : Protected source in attributes and inline CSS text are not handled.</li>
+		<li><a href="http://dev.ckeditor.com/ticket/6984">#6984</a> : [FF] Tailing line breaks are lost in enter mode BR.</li>
 		<li>Updated the following language files:<ul>
 			<li><a href="http://dev.ckeditor.com/ticket/7124">#7124</a> : Czech;</li>
Index: /CKEditor/trunk/_source/core/htmlparser/fragment.js
===================================================================
--- /CKEditor/trunk/_source/core/htmlparser/fragment.js	(revision 6457)
+++ /CKEditor/trunk/_source/core/htmlparser/fragment.js	(revision 6458)
@@ -109,7 +109,7 @@
 		}
 
-		function sendPendingBRs( brsToIgnore )
-		{
-			while ( pendingBRs.length - ( brsToIgnore || 0 ) > 0 )
+		function sendPendingBRs()
+		{
+			while ( pendingBRs.length )
 				currentNode.add( pendingBRs.shift() );
 		}
Index: /CKEditor/trunk/_source/plugins/wysiwygarea/plugin.js
===================================================================
--- /CKEditor/trunk/_source/plugins/wysiwygarea/plugin.js	(revision 6457)
+++ /CKEditor/trunk/_source/plugins/wysiwygarea/plugin.js	(revision 6458)
@@ -314,7 +314,11 @@
 			doc = editor.document,
 			body = editor.document.getBody(),
+			bodyFirstChild = body.getFirst(),
 			bodyChildsNum = body.getChildren().count();
 
-		if ( !bodyChildsNum || ( bodyChildsNum == 1&& body.getFirst().hasAttribute( '_moz_editor_bogus_node' ) ) )
+		if ( !bodyChildsNum
+			|| bodyChildsNum == 1
+				&& bodyFirstChild.type == CKEDITOR.NODE_ELEMENT
+				&& bodyFirstChild.hasAttribute( '_moz_editor_bogus_node' ) )
 		{
 			restoreDirty( editor );
@@ -983,4 +987,8 @@
 								}
 
+								// Distinguish bogus to normal BR at the end of document for Mozilla. (#5293).
+								if ( CKEDITOR.env.gecko )
+									data = data.replace( /<br \/>(?=\s*<\/(:?html|body)>)/, '$&<br type="_moz" />' );
+
 								data += activationScript;
 
@@ -1001,4 +1009,8 @@
 									? doc.getDocumentElement().getOuterHtml()
 									: doc.getBody().getHtml();
+
+								// BR at the end of document is bogus node for Mozilla. (#5293).
+								if ( CKEDITOR.env.gecko )
+									data = data.replace( /<br>(?=\s*(:?$|<\/body>))/, '' );
 
 								if ( editor.dataProcessor )
