Index: /FCKeditor/trunk/_whatsnew.html
===================================================================
--- /FCKeditor/trunk/_whatsnew.html	(revision 2988)
+++ /FCKeditor/trunk/_whatsnew.html	(revision 2989)
@@ -36,5 +36,9 @@
 		Version 2.6.4 (SVN)</h3>
 	<p>
-		Under beta stabilization. No changes so far.</p>
+		Fixed Bugs:</p>
+	<ul>
+		<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/2777">#2777</a>] Merging
+			cells between table header and table body is no longer possible.</li>
+	</ul>
 	<h3>
 		Version 2.6.4 Beta</h3>
Index: /FCKeditor/trunk/editor/_source/internals/fcktablehandler.js
===================================================================
--- /FCKeditor/trunk/editor/_source/internals/fcktablehandler.js	(revision 2988)
+++ /FCKeditor/trunk/editor/_source/internals/fcktablehandler.js	(revision 2989)
@@ -289,4 +289,11 @@
 		return false ;
 
+	// Check if the selected cells are all in the same table section (thead, tfoot or tbody)
+	for (var i = 0; i < cells.length; i++)
+	{
+		if ( cells[i].parentNode.parentNode != cells[0].parentNode.parentNode )
+			return false ;
+	}
+
 	this._MarkCells( cells, '_CellSelected' ) ;
 
@@ -840,4 +847,8 @@
 		return null ;
 
+	// Check if the selected cells are both in the same table section (thead, tfoot or tbody).
+	if ( refCell.parentNode.parentNode != nextCell.parentNode.parentNode )
+		return null ;
+
 	// The two cells must have the same horizontal geometry, otherwise merging does not makes sense.
 	this._MarkCells( [refCell, nextCell], '_SizeTest' ) ;
