Changeset 1997

Show
Ignore:
Timestamp:
2008-05-14 14:03:53 (8 months ago)
Author:
fredck
Message:

Fixed #1691 : Creation of links in Safari failed if there was no selection.

Location:
FCKeditor/trunk
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • FCKeditor/trunk/editor/_source/internals/fck_gecko.js

    r1951 r1997  
    416416        var aCreatedLinks = new Array() ; 
    417417 
     418        // Only for Safari, a collapsed selection may create a link. All other 
     419        // browser will have no links created. So, we check it here and return 
     420        // immediatelly, having the same cross browser behavior. 
     421        if ( FCKSelection.GetSelection().isCollapsed ) 
     422                return aCreatedLinks ; 
     423 
    418424        FCK.ExecuteNamedCommand( 'Unlink', null, false, !!noUndo ) ; 
    419425 
     
    434440                        var oLink = oLinksInteractor.snapshotItem( i ) ; 
    435441                        oLink.href = url ; 
    436  
    437                         // It may happen that the browser (aka Safari) decides to use the 
    438                         // URL as the link content to not leave it empty. In this case, 
    439                         // let's reset it. 
    440                         if ( sTempUrl == oLink.innerHTML ) 
    441                                 oLink.innerHTML = '' ; 
    442442 
    443443                        aCreatedLinks.push( oLink ) ; 
  • FCKeditor/trunk/_whatsnew.html

    r1996 r1997  
    9191                <li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1383">#1383</a>] Fixed an IE issue where  
    9292                        pressing backspace may merge a hyperlink on the previous line with the text on the current line.</li>  
     93                <li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1691">#1691</a>] Creation of links in Safari 
     94                        failed if there was no selection.</li> 
    9395        </ul> 
    9496        <h3>