8
0
Piotrek Koszuliński 9 лет назад
Родитель
Сommit
0e87d77956
1 измененных файлов с 2 добавлено и 2 удалено
  1. 2 2
      packages/ckeditor5-list/src/indentcommand.js

+ 2 - 2
packages/ckeditor5-list/src/indentcommand.js

@@ -33,11 +33,11 @@ export default class IndentCommand extends Command {
 		this._indentBy = indentDirection == 'forward' ? 1 : -1;
 
 		// Refresh command state after selection is changed or changes has been done to the document.
-		this.editor.document.selection.on( 'change:range', () => {
+		this.listenTo( editor.document.selection, 'change:range', () => {
 			this.refreshState();
 		} );
 
-		this.editor.document.on( 'changesDone', () => {
+		this.listenTo( editor.document, 'changesDone', () => {
 			this.refreshState();
 		} );
 	}