Ticket #3677: 3677.patch
File 3677.patch, 2.3 KB (added by , 15 years ago) |
---|
-
editor/_source/internals/fck_ie.js
378 378 { 379 379 // Creates the array that will be returned. It contains one or more created links (see #220). 380 380 var aCreatedLinks = new Array() ; 381 var isControl = FCKSelection.GetType() == 'Control' ; 382 var selectedElement = isControl && FCKSelection.GetSelectedElement() ; 381 383 382 384 // Remove any existing link in the selection. 383 FCK.ExecuteNamedCommand( 'Unlink', null, false, !!noUndo ) ; 385 // IE BUG: Unlinking a floating control selection that is not inside a link 386 // will collapse the selection. (#3677) 387 if ( !( isControl && !FCKTools.GetElementAscensor( selectedElement, 'a' ) ) ) 388 FCK.ExecuteNamedCommand( 'Unlink', null, false, !!noUndo ) ; 384 389 385 390 if ( url.length > 0 ) 386 391 { 387 392 // If there are several images, and you try to link each one, all the images get inside the link: 388 393 // <img><img> -> <a><img></a><img> -> <a><img><img></a> due to the call to 'CreateLink' (bug in IE) 389 if ( FCKSelection.GetType() == 'Control')394 if ( isControl ) 390 395 { 391 396 // Create a link 392 397 var oLink = this.EditorDocument.createElement( 'A' ) ; 393 398 oLink.href = url ; 394 399 395 400 // Get the selected object 396 var oControl = FCKSelection.GetSelectedElement();401 var oControl = selectedElement ; 397 402 // Put the link just before the object 398 403 oControl.parentNode.insertBefore(oLink, oControl) ; 399 404 // Move the object inside the link -
_whatsnew.html
75 75 custom connector tried to use the "url" attribute for files it was always reencoded.</li> 76 76 <li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1537">#1537</a>] Fixed extra 77 77 <p> tag added before pasted contents from Paste From Word dialog.</li> 78 <li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/3677">#3677</a>] Fixed JavaScript 79 error when trying to create link for images inside floating div containers.</li> 78 80 </ul> 79 81 <p> 80 82 <a href="_whatsnew_history.html">See previous versions history</a></p>