Index: /CKEditor/trunk/CHANGES.html
===================================================================
--- /CKEditor/trunk/CHANGES.html	(revision 5115)
+++ /CKEditor/trunk/CHANGES.html	(revision 5116)
@@ -95,4 +95,5 @@
 		<li><a href="http://dev.fckeditor.net/ticket/4767">#4767</a> : CKEditor does not work when ckeditor_source.js is loaded in the &lt;body&gt; .</li>
 		<li><a href="http://dev.fckeditor.net/ticket/5062">#5062</a> : Security warning message occurs when loading wysiwyg area in IE6 under HTTPS.</li>
+		<li><a href="http://dev.fckeditor.net/ticket/5135">#5135</a> : The TAB key will now behave properly when in Source mode.</li>
 		<li>Updated the following language files:<ul>
 			<li><a href="http://dev.fckeditor.net/ticket/5006">#5006</a> : Dutch;</li>
Index: /CKEditor/trunk/_source/plugins/tab/plugin.js
===================================================================
--- /CKEditor/trunk/_source/plugins/tab/plugin.js	(revision 5115)
+++ /CKEditor/trunk/_source/plugins/tab/plugin.js	(revision 5116)
@@ -6,4 +6,10 @@
 (function()
 {
+	var meta =
+	{
+		editorFocus : false,
+		modes : { wysiwyg:1, source:1 }
+	};
+
 	var blurCommand =
 		{
@@ -40,5 +46,5 @@
 
 			// Register the "tab" and "shiftTab" commands.
-			editor.addCommand( 'tab',
+			editor.addCommand( 'tab', CKEDITOR.tools.extend(
 				{
 					exec : function( editor )
@@ -62,7 +68,7 @@
 						return true;
 					}
-				});
-
-			editor.addCommand( 'shiftTab',
+				}, meta ) );
+
+			editor.addCommand( 'shiftTab', CKEDITOR.tools.extend(
 				{
 					exec : function( editor )
@@ -75,8 +81,8 @@
 						return true;
 					}
-				});
-
-			editor.addCommand( 'blur', blurCommand );
-			editor.addCommand( 'blurBack', blurBackCommand );
+				}, meta ) );
+
+			editor.addCommand( 'blur', CKEDITOR.tools.extend( blurCommand, meta ) );
+			editor.addCommand( 'blurBack', CKEDITOR.tools.extend( blurBackCommand, meta ) );
 		}
 	});
