Index: /CKEditor/branches/prototype/_source/plugins/dialogui/plugin.js
===================================================================
--- /CKEditor/branches/prototype/_source/plugins/dialogui/plugin.js	(revision 2753)
+++ /CKEditor/branches/prototype/_source/plugins/dialogui/plugin.js	(revision 2754)
@@ -860,4 +860,15 @@
 
 				/**
+				 * Puts focus into the text input.
+				 * @example
+				 */
+				focus : function()
+				{
+					var me = this;
+					// GECKO BUG: setTimeout() is needed to workaround invisible selections.
+					setTimeout( function(){ me.getInputElement().$.focus(); }, 0 );
+				},
+
+				/**
 				 * Selects all the text in the text input.
 				 * @example
@@ -865,6 +876,7 @@
 				select : function()
 				{
-					this.focus();
-					this.getInputElement().$.select();
+					var me = this;
+					// GECKO BUG: setTimeout() is needed to workaround invisible selections.
+					setTimeout( function(){ var e = me.getInputElement().$; e.focus(); e.select(); }, 0 );
 				},
 
Index: /CKEditor/branches/prototype/_source/plugins/link/dialogs/link.js
===================================================================
--- /CKEditor/branches/prototype/_source/plugins/link/dialogs/link.js	(revision 2753)
+++ /CKEditor/branches/prototype/_source/plugins/link/dialogs/link.js	(revision 2754)
@@ -66,4 +66,5 @@
 		}
 	},
+	// Loads the parameters in a selected link to the link dialog fields.
 		emailRegex = /^mailto:([^?]+)(?:\?(.+))?$/,
 		emailSubjectRegex = /subject=([^;?:@&=$,\/]*)/,
@@ -570,5 +571,6 @@
 			var editor = this.getParentEditor(),
 				selection = editor.getSelection(),
-				ranges = selection.getRanges();
+				ranges = selection.getRanges(),
+				me = this;
 
 			// Find out whether we have any anchors in the editor.
@@ -607,10 +609,19 @@
 					element = rangeRoot && rangeRoot.getAscendant( 'a' );
 				if ( element && element.getAttribute( 'href' ) )
+				{
 					loadLink.apply( this, [ editor, selection, ranges, element ] );
-				selection.selectElement( element );
-				this.saveSelection();
-			}
-
-			this.getContentElement( 'info', 'url' ).focus();
+					selection.selectElement( element );
+					this.saveSelection();
+				}
+			}
+
+			// Put focus into the first most likely used input.
+			var linkType = this.getValueOf( 'info', 'linkType' );
+			if ( linkType == 'url' )
+				me.getContentElement( 'info', 'url' ).select();
+			else if ( linkType == 'email' )
+				me.getContentElement( 'info', 'emailAddress' ).select();
+			else
+				me.getContentElement( 'info', 'anchorName' ).focus();
 		},
 		onOk : function()
