Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
asimkt authored Mar 15, 2021
1 parent 6807cfc commit 559eb19
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion packages/ckeditor5-autosave/src/autosave.js
Original file line number Diff line number Diff line change
Expand Up @@ -150,10 +150,16 @@ export default class Autosave extends Plugin {

this._pendingActions = editor.plugins.get( PendingActions );

this.listenTo( doc, 'change:data', () => {
this.listenTo( doc, 'change:data', (_e, batch) => {
if ( !this._saveCallbacks.length ) {
return;
}

// If the change is from another collaborative session from another user
// don't autosave.
if ( batch.type === 'transparent') {
return;
}

if ( this.state == 'synchronized' ) {
this._action = this._pendingActions.add( t( 'Saving changes' ) );
Expand Down

0 comments on commit 559eb19

Please sign in to comment.