\r
CKEDITOR.command = function( editor, commandDefinition )\r
{\r
+ this.uiItems = [];\r
+\r
this.exec = function( data )\r
{\r
if ( this.state == CKEDITOR.TRISTATE_DISABLED )\r
return false;\r
\r
- // The editor will always have the focus when executing a command.\r
- editor.focus();\r
+ if( this.editorFocus ) // Give editor focus if necessary (#4355).\r
+ editor.focus();\r
\r
return ( commandDefinition.exec.call( this, editor, data ) !== false );\r
};\r
// Defaults\r
{\r
modes : { wysiwyg : 1 },\r
+ editorFocus : true,\r
state : CKEDITOR.TRISTATE_OFF\r
});\r
\r