Index: _source/plugins/selection/plugin.js
===================================================================
--- _source/plugins/selection/plugin.js	(revision 4876)
+++ _source/plugins/selection/plugin.js	Thu Jan 28 17:51:43 CST 2010
@@ -695,9 +695,10 @@
 			if ( cache.selectedElement !== undefined )
 				return cache.selectedElement;
 
-			var node;
+			var node,
+					type = this.getType();
 
-			if ( this.getType() == CKEDITOR.SELECTION_ELEMENT )
+			if ( type == CKEDITOR.SELECTION_ELEMENT )
 			{
 				var sel = this.getNative();
 
@@ -715,16 +716,28 @@
 					node = range.startContainer.childNodes[ range.startOffset ];
 				}
 			}
+			// Somtimes browser lies on selection type (e.g. text[<img />]), figure it
+			// out by further checking the range. 
+			else if( type == CKEDITOR.SELECTION_TEXT )
+			{
+				// Bookmark the selection first since 'getEnclosedNode'
+				// call below could alter it.
+				var bookmarks = this.createBookmarks(),
+						range = this.getRanges()[ 0 ];
 
-			return cache.selectedElement = ( node ? new CKEDITOR.dom.element( node ) : null );
+				node = range.getEnclosedNode();
+				this.selectBookmarks( bookmarks );
+			}
+
+			return ( cache.selectedElement = node && node.type == CKEDITOR.NODE_ELEMENT  ? node : null );
 		},
 
 		lock : function()
 		{
 			// Call all cacheable function.
-			this.getRanges();
-			this.getStartElement();
 			this.getSelectedElement();
+			this.getStartElement();
+			this.getRanges();
 
 			// The native selection is not available when locked.
 			this._.cache.nativeSel = {};
