Skip to content

Commit a195b2a

Browse files
committed
Avoid enabling commands like undo/redo when changing filter (calling cmd.refresh).
1 parent 7a1f9fc commit a195b2a

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

core/command.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,8 +79,9 @@ CKEDITOR.command = function( editor, commandDefinition ) {
7979
return true;
8080
}
8181

82-
// Make the "enabled" state as basis.
83-
this.enable();
82+
// Make the "enabled" state a default for commands enabled from start.
83+
if ( !this.startDisabled )
84+
this.enable();
8485

8586
if ( this.fire( 'refresh', { editor: editor, path: path } ) === false )
8687
return true;

plugins/save/plugin.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
(function() {
1111
var saveCmd = {
1212
readOnly: 1,
13+
startDisabled: true,
1314

1415
exec: function( editor ) {
1516
if ( editor.fire( 'save' ) ) {

plugins/undo/plugin.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
this.fire( 'afterUndo' );
2424
}
2525
},
26+
startDisabled: true,
2627
canUndo: false
2728
} );
2829

@@ -33,6 +34,7 @@
3334
this.fire( 'afterRedo' );
3435
}
3536
},
37+
startDisabled: true,
3638
canUndo: false
3739
} );
3840

0 commit comments

Comments
 (0)