Index: /CKEditor/trunk/CHANGES.html
===================================================================
--- /CKEditor/trunk/CHANGES.html	(revision 5257)
+++ /CKEditor/trunk/CHANGES.html	(revision 5258)
@@ -79,4 +79,5 @@
 		<li><a href="http://dev.fckeditor.net/ticket/4830">#4830</a> : Retrieving selected element isn't always right, especially selecting using keyboard (SHIFT+ARROW).</li>
 		<li><a href="http://dev.fckeditor.net/ticket/5128">#5128</a> : Element attribute inside preformatted text is incorrectly corrupted when converting to other blocks.</li>
+		<li><a href="http://dev.fckeditor.net/ticket/5190">#5190</a> : Template entry should not gain initial focus in templates list dialog.</li>
 	</ul>
 	<h3>
Index: /CKEditor/trunk/_source/plugins/templates/dialogs/templates.js
===================================================================
--- /CKEditor/trunk/_source/plugins/templates/dialogs/templates.js	(revision 5257)
+++ /CKEditor/trunk/_source/plugins/templates/dialogs/templates.js	(revision 5258)
@@ -101,8 +101,8 @@
 			{
 				var target = evt.data.getTarget(),
-					position = listContainer.getPosition( target );
+						onList = listContainer.equals( target );
 
 				// Keyboard navigation for template list.
-				if ( position > CKEDITOR.POSITION_CONTAINS )
+				if (  onList || listContainer.contains( target ) )
 				{
 					var keystroke = evt.data.getKeystroke(),
@@ -112,17 +112,23 @@
 					if ( items )
 					{
-						switch ( keystroke )
-						{
-							case 40 :					// ARROW-DOWN
-								focusItem = target.getNext();
-								break;
-
-							case 38 :					// ARROW-UP
-								focusItem = target.getPrevious();
-								break;
-
-							case 13 :					// ENTER
-							case 32 :					// SPACE
-								target.fire( 'click' );
+						// Focus not yet onto list items?
+						if ( onList )
+							focusItem = items.getItem( 0 );
+						else
+						{
+							switch ( keystroke )
+							{
+								case 40 :					// ARROW-DOWN
+									focusItem = target.getNext();
+									break;
+
+								case 38 :					// ARROW-UP
+									focusItem = target.getPrevious();
+									break;
+
+								case 13 :					// ENTER
+								case 32 :					// SPACE
+									target.fire( 'click' );
+							}
 						}
 
@@ -169,10 +175,5 @@
 										id : "templatesList",
 										type : 'html',
-										focus: function()
-										{
-											// Move focus to the first list item if available.
-											try { this.getElement().getElementsByTag( 'a' ).getItem( 0 ).focus(); }
-											catch( er ){}
-										},
+										focus: true,
 										html :
 											'<div class="cke_tpl_list" tabIndex="-1" role="listbox" aria-labelledby="cke_tpl_list_label">' +
