Clear preview when document is modified

Use same logic for 'Show preview' as for 'Show changes'

Change-Id: I69510b426548fca46dc9b0d113b77ad206502b21
This commit is contained in:
Ed Sanders 2016-11-28 17:37:34 +00:00 committed by Jforrester
parent 4e05b86cf3
commit 915bbec307

View file

@ -1001,6 +1001,9 @@ ve.init.mw.ArticleTarget.prototype.onSaveDialogPreview = function () {
ve.msg( 'visualeditor-loaderror-message', ve.getProp( details, 'error', 'info' ) || 'Failed to connect' )
).html() );
}
target.getSurface().getModel().getDocument().once( 'transact',
target.saveDialog.clearDiff.bind( target.saveDialog )
);
} );
} else {
this.saveDialog.swapPanel( 'preview' );