mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-09-26 19:56:49 +00:00
Disconnect surface model history listener when tearing down
Bug: T195775 Change-Id: I6f6fe654dc190d7d891d3ac346bf3f4b2f426947
This commit is contained in:
parent
54f9335232
commit
4f456b143e
|
@ -1948,6 +1948,8 @@ ve.init.mw.ArticleTarget.prototype.teardown = function () {
|
||||||
if ( surface ) {
|
if ( surface ) {
|
||||||
// If target is closed cleanly (after save or deliberate close) then remove autosave state
|
// If target is closed cleanly (after save or deliberate close) then remove autosave state
|
||||||
surface.getModel().removeDocStateAndChanges();
|
surface.getModel().removeDocStateAndChanges();
|
||||||
|
// Disconnect history listener
|
||||||
|
surface.getModel().disconnect( this );
|
||||||
}
|
}
|
||||||
return ve.init.mw.ArticleTarget.super.prototype.teardown.call( this );
|
return ve.init.mw.ArticleTarget.super.prototype.teardown.call( this );
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue