From 273d6bf7645bb44ff75bfe59d49549c34c806a99 Mon Sep 17 00:00:00 2001 From: kbinieda Date: Wed, 4 Jan 2023 22:18:05 +0100 Subject: [PATCH 1/2] Feature (ckfinder): Make ckfinder enabled for track changes. --- packages/ckeditor5-ckfinder/src/ckfindercommand.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/ckeditor5-ckfinder/src/ckfindercommand.js b/packages/ckeditor5-ckfinder/src/ckfindercommand.js index f1650e6a61a..d7fb683c292 100644 --- a/packages/ckeditor5-ckfinder/src/ckfindercommand.js +++ b/packages/ckeditor5-ckfinder/src/ckfindercommand.js @@ -33,6 +33,9 @@ export default class CKFinderCommand extends Command { constructor( editor ) { super( editor ); + // The CKFinder command does not affect data by itself. + this._affectsData = false; + // Remove default document listener to lower its priority. this.stopListening( this.editor.model.document, 'change' ); From 3c23f8faeef195c4f1b3795329464972ab67951b Mon Sep 17 00:00:00 2001 From: kbinieda Date: Sun, 8 Jan 2023 11:24:27 +0100 Subject: [PATCH 2/2] Add missing test. --- packages/ckeditor5-ckfinder/tests/ckfindercommand.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/packages/ckeditor5-ckfinder/tests/ckfindercommand.js b/packages/ckeditor5-ckfinder/tests/ckfindercommand.js index 64936018489..abcb9f35388 100644 --- a/packages/ckeditor5-ckfinder/tests/ckfindercommand.js +++ b/packages/ckeditor5-ckfinder/tests/ckfindercommand.js @@ -455,4 +455,10 @@ describe( 'CKFinderCommand', () => { mockFinderEvent( 'files:choose', data ); } } ); + + describe( '_affectsData', () => { + it( 'does not affect data', () => { + expect( command._affectsData ).to.be.false; + } ); + } ); } );