Merge "Clear save caches when toolbar is re-attached"

This commit is contained in:
jenkins-bot 2016-05-26 16:00:08 +00:00 committed by Gerrit Code Review
commit 02a8369777

View file

@ -913,6 +913,7 @@ ve.init.mw.ArticleTarget.prototype.onSaveDialogClose = function () {
// Clear the cached HTML and cache key once the document changes
if ( this.getSurface() ) {
this.getSurface().getModel().getDocument().once( 'transact', clear );
this.getSurface().once( 'destroy', clear );
} else {
clear();
}
@ -1472,6 +1473,11 @@ ve.init.mw.ArticleTarget.prototype.setupToolbar = function () {
this.setupToolbarSaveButton();
this.attachToolbarSaveButton();
if ( this.saveDialog ) {
this.saveDialog.disconnect( this );
this.saveDialog = null;
}
};
/**