Index: _source/plugins/table/dialogs/table.js
===================================================================
--- _source/plugins/table/dialogs/table.js	(revision 6348)
+++ _source/plugins/table/dialogs/table.js	(revision )
@@ -116,11 +116,8 @@
 			},
 			onOk : function()
 			{
-				if ( this._.selectedElement )
-				{
-					var selection = editor.getSelection(),
-						bms = selection.createBookmarks();
+				var selection = editor.getSelection(),
+					bms = selection.createBookmarks();
-				}
 
 				var table = this._.selectedElement || makeElement( 'table' ),
 					me = this,
@@ -248,10 +245,11 @@
 				// Insert the table element if we're creating one.
 				if ( !this._.selectedElement )
 					editor.insertElement( table );
-				// Properly restore the selection inside table. (#4822)
-				else
-					selection.selectBookmarks( bms );
 
+				// Properly restore the selection, (#4822) but don't break
+				// because of this, e.g. updated table caption.
+				try { selection.selectBookmarks( bms ); } catch( er ){}
+
 				return true;
 			},
 			contents : [
@@ -600,16 +598,32 @@
 									label : editor.lang.table.caption,
 									setup : function( selectedTable )
 									{
+										this.enable();
+
 										var nodeList = selectedTable.getElementsByTag( 'caption' );
 										if ( nodeList.count() > 0 )
 										{
 											var caption = nodeList.getItem( 0 );
+
+											var innerHtml = caption.getHtml().replace(/<br>\s*$/i, ''),
+												innerText = caption.getText();
+
+											if ( innerHtml != innerText )
+											{
+												this.disable();
+												this.setValue( innerText );
+												return;
+											}
+
 											caption = CKEDITOR.tools.trim( caption.getText() );
 											this.setValue( caption );
 										}
 									},
 									commit : function( data, table )
 									{
+										if ( !this.isEnabled() )
+											return;
+
 										var caption = this.getValue(),
 											captionElement = table.getElementsByTag( 'caption' );
 										if ( caption )
