mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-28 08:10:35 +00:00
Simplify teardown of toolbar save button
Bug: T136421 Change-Id: I6829ad75b93c6aa6c6db51b5c9cd84915c75cdb8
This commit is contained in:
parent
02b3d6bad9
commit
0a0ca68d62
|
@ -609,12 +609,7 @@ ve.init.mw.DesktopArticleTarget.prototype.cancel = function ( trackMechanism ) {
|
|||
this.originalEditondbclick = undefined;
|
||||
|
||||
if ( this.toolbarSaveButton ) {
|
||||
// If deactivate is called before a successful load, then the save button has not yet been
|
||||
// fully set up so disconnecting it would throw an error when trying call methods on the
|
||||
// button property (bug 46456)
|
||||
this.toolbarSaveButton.disconnect( this );
|
||||
this.toolbarSaveButton.$element.detach();
|
||||
this.getToolbar().$actions.empty();
|
||||
this.toolbarSaveButton = null;
|
||||
}
|
||||
|
||||
// Check we got as far as setting up the surface
|
||||
|
|
Loading…
Reference in a new issue