Index: /CKEditor/trunk/CHANGES.html
===================================================================
--- /CKEditor/trunk/CHANGES.html	(revision 6919)
+++ /CKEditor/trunk/CHANGES.html	(revision 6920)
@@ -50,4 +50,5 @@
 		<li><a href="http://dev.ckeditor.com/ticket/6962">#6962</a> : Changed the CKEDITOR.CTRL, CKEDITOR.SHIFT and CKEDITOR.ALT constant values to avoid collision with any possible unicode character.</li>
 		<li><a href="http://dev.ckeditor.com/ticket/6263">#6263</a> : Some of the table cell's context menu options may be incorrectly disabled.</li>
+		<li><a href="http://dev.ckeditor.com/ticket/6247">#6247</a> : Focus restores properly after float panel is closed.</li>
 		<li>Updated the following language files:<ul>
 			<li><a href="http://dev.ckeditor.com/ticket/7834">#7834</a> : Dutch;</li>
Index: /CKEditor/trunk/_source/plugins/floatpanel/plugin.js
===================================================================
--- /CKEditor/trunk/_source/plugins/floatpanel/plugin.js	(revision 6919)
+++ /CKEditor/trunk/_source/plugins/floatpanel/plugin.js	(revision 6920)
@@ -52,4 +52,5 @@
 			this._ =
 			{
+				editor : editor,
 				// The panel that will be floating.
 				panel : panel,
@@ -103,4 +104,8 @@
 				isShowing = 1;
 
+				// Record from where the focus is when open panel.
+				this._.returnFocus = this._.editor.focusManager.hasFocus ? this._.editor : new CKEDITOR.dom.element( CKEDITOR.document.$.activeElement );
+
+
 				var element = this.element,
 					iframe = this._.iframe,
@@ -165,5 +170,10 @@
 
 							if ( this.visible && !this._.activeChild && !isShowing )
+							{
+								// Panel close is caused by user's navigating away the focus, e.g. click outside the panel.
+								// DO NOT restore focus in this case.
+								delete this._.returnFocus;
 								this.hide();
+							}
 						},
 						this );
@@ -323,4 +333,15 @@
 					this.visible = 0;
 					this.element.getFirst().removeCustomData( 'activePanel' );
+
+					// Return focus properly. (#6247)
+					var focusReturn = this._.returnFocus;
+					if ( focusReturn )
+					{
+						// Webkit requires focus moved out panel iframe first.
+						if ( CKEDITOR.env.webkit && focusReturn.type )
+							focusReturn.getWindow().$.focus();
+
+						focusReturn.focus();
+					}
 				}
 			},
Index: /CKEditor/trunk/_source/plugins/richcombo/plugin.js
===================================================================
--- /CKEditor/trunk/_source/plugins/richcombo/plugin.js	(revision 6919)
+++ /CKEditor/trunk/_source/plugins/richcombo/plugin.js	(revision 6920)
@@ -256,5 +256,4 @@
 				{
 					panel.hide();
-					me.document.getById( 'cke_' + me.id ).getFirst().getNext().focus();
 				};
 
Index: /CKEditor/trunk/_source/plugins/stylescombo/plugin.js
===================================================================
--- /CKEditor/trunk/_source/plugins/stylescombo/plugin.js	(revision 6919)
+++ /CKEditor/trunk/_source/plugins/stylescombo/plugin.js	(revision 6920)
@@ -97,5 +97,4 @@
 								combo.commit();
 
-								combo.onOpen();
 							});
 					},
