Index: /CKEditor/trunk/CHANGES.html
===================================================================
--- /CKEditor/trunk/CHANGES.html	(revision 5881)
+++ /CKEditor/trunk/CHANGES.html	(revision 5882)
@@ -84,4 +84,7 @@
 		<li><a href="http://dev.ckeditor.com/ticket/6075">#6075</a> : [FF] Newly created links didn't fill in information on edit.</li>
 		<li><a href="http://dev.ckeditor.com/ticket/6183">#6183</a> : The toolbar panels options sometimes had the contents' link color.</li>
+		<li><a href="http://dev.ckeditor.com/ticket/6192">#6192</a> : [WebKit] Inserting smileys was not working because of editor focus issues.</li>
+		<li><a href="http://dev.ckeditor.com/ticket/6178">#6178</a> : [WebKit] Inserting elements by code was failing if the editor didn't receive the focus first.</li>
+		<li><a href="http://dev.ckeditor.com/ticket/6179">#6179</a> : [WebKit] The Image dialog was not working if the editor didn't receive the focus first.</li>
 		<li>Updated the following language files:<ul>
 			<li><a href="http://dev.ckeditor.com/ticket/6246">#6246</a> : Chinese Simplified;</li>
Index: /CKEditor/trunk/_source/plugins/selection/plugin.js
===================================================================
--- /CKEditor/trunk/_source/plugins/selection/plugin.js	(revision 5881)
+++ /CKEditor/trunk/_source/plugins/selection/plugin.js	(revision 5882)
@@ -692,14 +692,27 @@
 					// instances.
 
-					var ranges = [];
-					var sel = this.getNative();
+					var ranges = [],
+						range,
+						doc = this.document,
+						sel = this.getNative();
 
 					if ( !sel )
-						return [];
+						return ranges;
+
+					// On WebKit, it may happen that we'll have no selection
+					// available. We normalize it here by replicating the
+					// behavior of other browsers.
+					if ( !sel.rangeCount )
+					{
+						range = new CKEDITOR.dom.range( doc );
+						range.moveToElementEditStart( doc.getBody() );
+						ranges.push( range );
+					}
 
 					for ( var i = 0 ; i < sel.rangeCount ; i++ )
 					{
 						var nativeRange = sel.getRangeAt( i );
-						var range = new CKEDITOR.dom.range( this.document );
+
+						range = new CKEDITOR.dom.range( doc );
 
 						range.setStart( new CKEDITOR.dom.node( nativeRange.startContainer ), nativeRange.startOffset );
