Index: /CKEditor/trunk/CHANGES.html
===================================================================
--- /CKEditor/trunk/CHANGES.html	(revision 3791)
+++ /CKEditor/trunk/CHANGES.html	(revision 3792)
@@ -1,3 +1,3 @@
-﻿﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+﻿﻿﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 <!--
 Copyright (c) 2003-2009, CKSource - Frederico Knabben. All rights reserved.
@@ -81,5 +81,6 @@
 			block instead of selected lines in enterMode = BR.</li>
 		<li><a href="http://dev.fckeditor.net/ticket/3844">#3844</a> : Fixed UndoManager register keydown on obsoleted document</li>
-		<li><a href="http://dev.fckeditor.net/ticket/3805">#3805</a> : Enabled SCAYT plugin for IE.</li> 
+		<li><a href="http://dev.fckeditor.net/ticket/3805">#3805</a> : Enabled SCAYT plugin for IE.</li>
+		<li><a href="http://dev.fckeditor.net/ticket/3834">#3834</a> : Context menu on table caption was incorrect.</li>
 	</ul>
 	<h3>
Index: /CKEditor/trunk/_source/plugins/tabletools/plugin.js
===================================================================
--- /CKEditor/trunk/_source/plugins/tabletools/plugin.js	(revision 3791)
+++ /CKEditor/trunk/_source/plugins/tabletools/plugin.js	(revision 3792)
@@ -416,4 +416,7 @@
 		}
 	}
+
+	// Context menu on table caption incorrect (#3834)
+	var contextMenuTags = { thead : 1, tbody : 1, tfoot : 1, td : 1, tr : 1, th : 1 };
 
 	CKEDITOR.plugins.tabletools =
@@ -674,16 +677,14 @@
 							return null;
 
-							var isCell	= !element.is( 'table' ) && element.hasAscendant( 'table' ) ;
-
-							if ( isCell )
-							{
-								return {
-									tablecell : CKEDITOR.TRISTATE_OFF,
-									tablerow : CKEDITOR.TRISTATE_OFF,
-									tablecolumn : CKEDITOR.TRISTATE_OFF
-								};
-							}
-
-							return null;
+						if ( element.getName() in contextMenuTags && element.hasAscendant( 'table' ) )
+						{
+							return {
+								tablecell : CKEDITOR.TRISTATE_OFF,
+								tablerow : CKEDITOR.TRISTATE_OFF,
+								tablecolumn : CKEDITOR.TRISTATE_OFF
+							};
+						}
+
+						return null;
 					} );
 			}
