Index: _source/plugins/sourcearea/plugin.js
===================================================================
--- _source/plugins/sourcearea/plugin.js	(revision 3217)
+++ _source/plugins/sourcearea/plugin.js	(working copy)
@@ -35,11 +35,6 @@
 								outline	: 'none',
 								'text-align' : 'left' });
 
-							// Add the tab index for #3098.
-							var tabIndex = editor.element && editor.element.getAttribute( 'tabIndex' );
-							if ( tabIndex )
-								textarea.setAttribute( 'tabIndex', tabIndex );
-
 							// The textarea height/width='100%' doesn't
 							// constraint to the 'td' in IE strick mode
 							if ( CKEDITOR.env.ie )
@@ -74,6 +69,23 @@
 							// Set the <textarea> value.
 							this.loadData( data );
 
+							// Execute "tab" and "shiftTab" commands if the relevant keys are
+							// pressed. (#3104)
+							textarea.on( 'keydown', function( evt )
+								{
+									var $evt = evt.data.$;
+
+									if ( $evt.keyCode != 9 || $evt.ctrlKey || $evt.metaKey || $evt.altKey )
+										return;
+
+									if ( $evt.shiftKey )
+										editor.execCommand( 'shiftTab' );
+									else
+										editor.execCommand( 'tab' );
+
+									evt.data.preventDefault();
+								} );
+
 							editor.mode = 'source';
 							editor.fire( 'mode' );
 						},
Index: _source/plugins/editingblock/plugin.js
===================================================================
--- _source/plugins/editingblock/plugin.js	(revision 3217)
+++ _source/plugins/editingblock/plugin.js	(working copy)
@@ -98,10 +98,17 @@
 					// Do that once only.
 					event.removeListener();
 
+					// Grab editor focus if the editor container is focused. (#3104)
+					editor.container.on( 'focus', function()
+						{
+							editor.focus();
+						} );
+
 					// Fire instanceReady for both the editor and CKEDITOR.
 					editor.fireOnce( 'instanceReady' );
 					CKEDITOR.fire( 'instanceReady', null, editor );
 				});
+
 		}
 	});
 
Index: _source/plugins/tab/plugin.js
===================================================================
--- _source/plugins/tab/plugin.js	(revision 3217)
+++ _source/plugins/tab/plugin.js	(working copy)
@@ -253,6 +253,9 @@
 
 			element = new CKEDITOR.dom.element( element );
 
+			if ( element.getComputedStyle( 'display' ) == 'none' || element.getComputedStyle( 'visibility' ) == 'hidden' )
+				continue;
+
 			elementTabIndex = element.getTabIndex();
 
 			if ( elementTabIndex > 0 )
Index: _source/plugins/wysiwygarea/plugin.js
===================================================================
--- _source/plugins/wysiwygarea/plugin.js	(revision 3217)
+++ _source/plugins/wysiwygarea/plugin.js	(working copy)
@@ -106,7 +106,7 @@
 
 					// The following information is needed for IE only.
 					var isCustomDomain = CKEDITOR.env.ie && document.domain != window.location.hostname;
-
+						
 					// Creates the iframe that holds the editable document.
 					var createIFrame = function()
 					{
@@ -121,10 +121,6 @@
 								width : '100%',
 								height : '100%' });
 
-						var tabIndex = editor.element && editor.element.getAttribute( 'tabIndex' );
-						if ( tabIndex )
-							iframe.setAttribute( 'tabIndex', tabIndex );
-
 						if ( CKEDITOR.env.ie )
 						{
 							if ( isCustomDomain )
Index: _source/themes/default/theme.js
===================================================================
--- _source/themes/default/theme.js	(revision 3217)
+++ _source/themes/default/theme.js	(working copy)
@@ -45,6 +45,7 @@
 
 			var height	= contentsHtml && editor.config.height;
 			var width	= editor.config.width;
+			var tabIndex = editor.element.getAttribute( 'tabIndex' );
 
 			// The editor height is considered only if the contents space got filled.
 			if ( !contentsHtml )
@@ -66,7 +67,8 @@
 			// differently by the browsers ("semi-inline").
 			var container = CKEDITOR.dom.element.createFromHtml( [
 				'<span id="cke_', name, '" onmousedown="return false;" class="', editor.skinClass,
-					'" dir="', editor.lang.dir, '" title="', ( CKEDITOR.env.gecko ? ' ' : '' ), '">' +
+					'" dir="', editor.lang.dir, '" title="', ( CKEDITOR.env.gecko ? ' ' : '' ), '"' +
+					( tabIndex ? ' tabindex="' + tabIndex + '">' : '>' ) +
 				'<span class="' , browserCssClass, ' cke_', editor.lang.dir, '">' +
 					'<table class="cke_editor" border="0" cellspacing="0" cellpadding="0" style="width:', width, ';height:', height, '"><tbody>' +
 						'<tr', topHtml		? '' : ' style="display:none"', '><td id="cke_top_'		, name, '" class="cke_top">'		, topHtml		, '</td></tr>' +
Index: _samples/replacebyclass.html
===================================================================
--- _samples/replacebyclass.html	(revision 3217)
+++ _samples/replacebyclass.html	(working copy)
@@ -14,7 +14,7 @@
 			<p>
 				<label for="editor1">
 					Editor 1:</label><br />
-				<textarea id="editor1" name="editor1" class="ckeditor" rows="10" cols="80">&lt;p&gt;This is some &lt;strong&gt;sample text&lt;/strong&gt;. You are using &lt;a href="http://www.fckeditor.net/"&gt;FCKeditor&lt;/a&gt;.&lt;/p&gt;</textarea>
+				<textarea id="editor1" name="editor1" class="ckeditor" rows="10" cols="80" tabindex="4">&lt;p&gt;This is some &lt;strong&gt;sample text&lt;/strong&gt;. You are using &lt;a href="http://www.fckeditor.net/"&gt;FCKeditor&lt;/a&gt;.&lt;/p&gt;</textarea>
 			</p>
 			<p>
 				<input type="submit" value="Submit" />
Index: _samples/sample.html
===================================================================
--- _samples/sample.html	(revision 3217)
+++ _samples/sample.html	(working copy)
@@ -66,11 +66,17 @@
 	     pages. -->
 	<fieldset title="Output">
 		<legend>Output</legend>
+		<input type="text" name="aaa" tabindex="1" />
+		<input type="text" name="bbb" tabindex="2" />
+		<input type="text" name="ccc" tabindex="3" />
 		<script id="html" type="text/javascript">
 		//<![CDATA[
 			document.write( CKEDITOR.samples.htmlData );
 		//]]>
 		</script>
+		<input type="text" name="ddd" tabindex="5" />
+		<input type="text" name="eee" tabindex="6" />
+		<input type="text" name="fff" tabindex="7" />
 	</fieldset>
 	<!-- This <fieldset> contains the output readable code that illustrates
 	     how to use the editor, having the results shown in this sample. -->
