Index: FCKeditor/trunk/_whatsnew.html
===================================================================
--- FCKeditor/trunk/_whatsnew.html	(revision 3973)
+++ FCKeditor/trunk/_whatsnew.html	(revision 3974)
@@ -84,4 +84,6 @@
  		<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/3481">#3481</a>] Fixed an issue in
  			WebKit where paste actions inside table cells may leak outside of the table cell.</li>
+ 		<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/3677">#3677</a>] Fixed JavaScript
+ 			error when trying to create link for images inside floating div containers.</li>
 	</ul>
 	<p>
Index: FCKeditor/trunk/editor/_source/internals/fck_ie.js
===================================================================
--- FCKeditor/trunk/editor/_source/internals/fck_ie.js	(revision 3973)
+++ FCKeditor/trunk/editor/_source/internals/fck_ie.js	(revision 3974)
@@ -379,7 +379,12 @@
 	// Creates the array that will be returned. It contains one or more created links (see #220).
 	var aCreatedLinks = new Array() ;
+	var isControl = FCKSelection.GetType() == 'Control' ;
+	var selectedElement = isControl && FCKSelection.GetSelectedElement() ;
 
 	// Remove any existing link in the selection.
-	FCK.ExecuteNamedCommand( 'Unlink', null, false, !!noUndo ) ;
+	// IE BUG: Unlinking a floating control selection that is not inside a link
+	// will collapse the selection. (#3677)
+	if ( !( isControl && !FCKTools.GetElementAscensor( selectedElement, 'a' ) ) )
+		FCK.ExecuteNamedCommand( 'Unlink', null, false, !!noUndo ) ;
 
 	if ( url.length > 0 )
@@ -387,5 +392,5 @@
 		// If there are several images, and you try to link each one, all the images get inside the link:
 		// <img><img> -> <a><img></a><img> -> <a><img><img></a> due to the call to 'CreateLink' (bug in IE)
-		if (FCKSelection.GetType() == 'Control')
+		if ( isControl )
 		{
 			// Create a link
@@ -394,5 +399,5 @@
 
 			// Get the selected object
-			var oControl = FCKSelection.GetSelectedElement() ;
+			var oControl = selectedElement ;
 			// Put the link just before the object
 			oControl.parentNode.insertBefore(oLink, oControl) ;
