Index: /CKEditor/branches/prototype/_source/plugins/link/plugin.js
===================================================================
--- /CKEditor/branches/prototype/_source/plugins/link/plugin.js	(revision 2767)
+++ /CKEditor/branches/prototype/_source/plugins/link/plugin.js	(revision 2768)
@@ -71,4 +71,5 @@
 		 */
 		var selection = editor.getSelection(),
+			bookmarks = selection.createBookmarks(),
 			ranges = selection.getRanges(),
 			rangeRoot,
@@ -78,5 +79,5 @@
 		{
 			rangeRoot = ranges[i].getCommonAncestor( true );
-			element = rangeRoot.getAscendant( 'a' );
+			element = rangeRoot.getAscendant( 'a', true );
 			if ( !element )
 				continue;
@@ -86,4 +87,5 @@
 		selection.selectRanges( ranges );
 		editor.document.$.execCommand( 'unlink', false, null );
+		selection.selectBookmarks( bookmarks );
 	}
 };
Index: /CKEditor/branches/prototype/_source/plugins/selection/plugin.js
===================================================================
--- /CKEditor/branches/prototype/_source/plugins/selection/plugin.js	(revision 2767)
+++ /CKEditor/branches/prototype/_source/plugins/selection/plugin.js	(revision 2768)
@@ -609,5 +609,27 @@
 						sel.addRange( nativeRange );
 					}
-				}
+				},
+
+		createBookmarks : function()
+		{
+			var retval = [],
+				ranges = this.getRanges();
+			for ( var i = 0 ; i < ranges.length ; i++ )
+				retval.push( ranges[i].createBookmark() );
+			return retval;
+		},
+
+		selectBookmarks : function( bookmarks )
+		{
+			var ranges = [];
+			for ( var i = 0 ; i < bookmarks.length ; i++ )
+			{
+				var range = new CKEDITOR.dom.range( this.document );
+				range.moveToBookmark( bookmarks[i] );
+				ranges.push( range );
+			}
+			this.selectRanges( ranges );
+			return this;
+		}
 	};
 })();
