Ticket #1691: 1691_2.patch

File 1691_2.patch, 1.8 KB (added by Frederico Caldeira Knabben, 16 years ago)
  • _whatsnew.html

     
    8181                        correctly restored when undoing changes made by the Replace dialog.</li>
    8282                <li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/2160">#2160</a>] "Match whole word" in the
    8383                        Find and Replace dialog will now find words next to punctuation marks as well.</li>
     84                <li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1691">#1691</a>] Creation of links in Safari
     85                        failed if there was no selection.</li>
    8486        </ul>
    8587        <h3>
    8688                Version 2.6</h3>
  • editor/_source/internals/fck_gecko.js

     
    415415        // Creates the array that will be returned. It contains one or more created links (see #220).
    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 creates. 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
    420426        if ( url.length > 0 )
     
    434440                        var oLink = oLinksInteractor.snapshotItem( i ) ;
    435441                        oLink.href = url ;
    436442
    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 = '' ;
    442 
    443443                        aCreatedLinks.push( oLink ) ;
    444444                }
    445445        }
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy