Index: /FCKeditor/trunk/_whatsnew.html
===================================================================
--- /FCKeditor/trunk/_whatsnew.html	(revision 1717)
+++ /FCKeditor/trunk/_whatsnew.html	(revision 1718)
@@ -85,4 +85,7 @@
 		<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/2011">#2011</a>] Internal
 			CSS &lt;style&gt; tags where being outputted when FullPage=true.</li>
+		<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/2016">#2016</a>] The Link
+			dialog now properly select the first field when opening it to modify mailto or anchor
+			links. This problem was also throwing an error in IE.</li>
 	</ul>
 	<h3>
Index: /FCKeditor/trunk/editor/dialog/common/fck_dialog_common.js
===================================================================
--- /FCKeditor/trunk/editor/dialog/common/fck_dialog_common.js	(revision 1717)
+++ /FCKeditor/trunk/editor/dialog/common/fck_dialog_common.js	(revision 1718)
@@ -105,5 +105,8 @@
 	var element = GetE( elementId ) ;
 	element.focus() ;
-	element.select() ;
+
+	// element.select may not be available for some fields (like <select>).
+	if ( element.select )
+		element.select() ;
 }
 
Index: /FCKeditor/trunk/editor/dialog/fck_link/fck_link.js
===================================================================
--- /FCKeditor/trunk/editor/dialog/fck_link/fck_link.js	(revision 1717)
+++ /FCKeditor/trunk/editor/dialog/fck_link/fck_link.js	(revision 1718)
@@ -160,5 +160,20 @@
 	// Activate the "OK" button.
 	dialog.SetOkButton( true ) ;
-	SelectField( 'txtUrl' ) ;
+	
+	// Select the first field.
+	switch( GetE('cmbLinkType').value )
+	{
+		case 'url' :
+			SelectField( 'txtURL' ) ;
+			break ;
+		case 'email' :
+			SelectField( 'txtEMailAddress' ) ;
+			break ;
+		case 'anchor' : 
+			if ( GetE('divSelAnchor').style.display != 'none' )
+				SelectField( 'cmbAnchorName' ) ;
+			else
+				SelectField( 'cmbLinkType' ) ;
+	}
 }
 
