Got questions, comments, patches, etc.?
Contact Jason Woofenden
gitweb
/
ckeditor.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
vanilla ckeditor-3.0.1
[ckeditor.git]
/
_source
/
core
/
command.js
diff --git
a/_source/core/command.js
b/_source/core/command.js
index
fe64f21
..
f365470
100644
(file)
--- a/
_source/core/command.js
+++ b/
_source/core/command.js
@@
-5,13
+5,15
@@
For licensing, see LICENSE.html or http://ckeditor.com/license
\r
CKEDITOR.command = function( editor, commandDefinition )
\r
{
\r
\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
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
\r
return ( commandDefinition.exec.call( this, editor, data ) !== false );
\r
};
\r
@@
-20,6
+22,7
@@
CKEDITOR.command = function( editor, commandDefinition )
// Defaults
\r
{
\r
modes : { wysiwyg : 1 },
\r
// Defaults
\r
{
\r
modes : { wysiwyg : 1 },
\r
+ editorFocus : true,
\r
state : CKEDITOR.TRISTATE_OFF
\r
});
\r
\r
state : CKEDITOR.TRISTATE_OFF
\r
});
\r
\r