Index: /FCKeditor/trunk/_whatsnew.html =================================================================== --- /FCKeditor/trunk/_whatsnew.html (revision 3973) +++ /FCKeditor/trunk/_whatsnew.html (revision 3974) @@ -84,4 +84,6 @@
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: // -> -> 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) ;