Index: /CKEditor/trunk/CHANGES.html
===================================================================
--- /CKEditor/trunk/CHANGES.html	(revision 5883)
+++ /CKEditor/trunk/CHANGES.html	(revision 5884)
@@ -88,4 +88,5 @@
 		<li><a href="http://dev.ckeditor.com/ticket/6179">#6179</a> : [WebKit] The Image dialog was not working if the editor didn't receive the focus first.</li>
 		<li><a href="http://dev.ckeditor.com/ticket/4657">#4657</a> : [Opera] Styles where not working with collapsed selections.</li>
+		<li><a href="http://dev.ckeditor.com/ticket/5839">#5839</a> : "Insert row after" was removing the ids of the elements from the clicked row.</li>
 		<li>Updated the following language files:<ul>
 			<li><a href="http://dev.ckeditor.com/ticket/6246">#6246</a> : Chinese Simplified;</li>
Index: /CKEditor/trunk/_source/plugins/tabletools/plugin.js
===================================================================
--- /CKEditor/trunk/_source/plugins/tabletools/plugin.js	(revision 5883)
+++ /CKEditor/trunk/_source/plugins/tabletools/plugin.js	(revision 5884)
@@ -149,10 +149,10 @@
 		var newRow = row.clone( true );
 
-		// Insert the new row before of it.
-		newRow.insertBefore( row );
-
-		// Clean one of the rows to produce the illusion of inserting an empty row
-		// before or after.
-		clearRow( insertBefore ? newRow.$ : row.$ );
+		insertBefore ?
+			newRow.insertBefore( row ) :
+			newRow.insertAfter( row );
+
+		// Clean the new row.
+		clearRow( newRow.$ );
 	}
 
