Index: /FCKeditor/trunk/_whatsnew.html
===================================================================
--- /FCKeditor/trunk/_whatsnew.html (revision 1996)
+++ /FCKeditor/trunk/_whatsnew.html (revision 1997)
@@ -91,4 +91,6 @@
[#1383] Fixed an IE issue where
pressing backspace may merge a hyperlink on the previous line with the text on the current line.
+ [#1691] Creation of links in Safari
+ failed if there was no selection.
Index: /FCKeditor/trunk/editor/_source/internals/fck_gecko.js
===================================================================
--- /FCKeditor/trunk/editor/_source/internals/fck_gecko.js (revision 1996)
+++ /FCKeditor/trunk/editor/_source/internals/fck_gecko.js (revision 1997)
@@ -416,4 +416,10 @@
var aCreatedLinks = new Array() ;
+ // Only for Safari, a collapsed selection may create a link. All other
+ // browser will have no links created. So, we check it here and return
+ // immediatelly, having the same cross browser behavior.
+ if ( FCKSelection.GetSelection().isCollapsed )
+ return aCreatedLinks ;
+
FCK.ExecuteNamedCommand( 'Unlink', null, false, !!noUndo ) ;
@@ -434,10 +440,4 @@
var oLink = oLinksInteractor.snapshotItem( i ) ;
oLink.href = url ;
-
- // It may happen that the browser (aka Safari) decides to use the
- // URL as the link content to not leave it empty. In this case,
- // let's reset it.
- if ( sTempUrl == oLink.innerHTML )
- oLink.innerHTML = '' ;
aCreatedLinks.push( oLink ) ;