Esanders has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/97913


Change subject: Tear down the save dialog and remove it from memory on surface 
teardown
......................................................................

Tear down the save dialog and remove it from memory on surface teardown

Otherwise the old save dialog will still be around if the user sets up
another surface (e.g. a second edit), but won't be attached to the DOM.

Bug: 57654
Change-Id: I23c10849a212534bdd0600637d8ad4fa3ebc4fb7
---
M modules/ve-mw/init/targets/ve.init.mw.ViewPageTarget.js
1 file changed, 6 insertions(+), 5 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/VisualEditor 
refs/changes/13/97913/1

diff --git a/modules/ve-mw/init/targets/ve.init.mw.ViewPageTarget.js 
b/modules/ve-mw/init/targets/ve.init.mw.ViewPageTarget.js
index 4997157..c8c7cb1 100644
--- a/modules/ve-mw/init/targets/ve.init.mw.ViewPageTarget.js
+++ b/modules/ve-mw/init/targets/ve.init.mw.ViewPageTarget.js
@@ -195,11 +195,6 @@
                                this.detachToolbarButtons();
                        }
 
-                       if ( this.saveDialog ) {
-                               // If we got as far as setting up the save 
dialog, tear it down
-                               this.saveDialog.reset();
-                               this.saveDialog.close();
-                       }
                        // Check we got as far as setting up the surface
                        if ( this.active ) {
                                // If we got as far as setting up the surface, 
tear that down
@@ -1062,6 +1057,12 @@
        }
        this.tearDownToolbar();
        this.restoreDocumentTitle();
+       if ( this.saveDialog ) {
+               // If we got as far as setting up the save dialog, tear it down
+               this.saveDialog.close();
+               this.saveDialog.teardown();
+               this.saveDialog = null;
+       }
        // Destroy surface
        if ( this.surface ) {
                this.surface.destroy();

-- 
To view, visit https://gerrit.wikimedia.org/r/97913
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I23c10849a212534bdd0600637d8ad4fa3ebc4fb7
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Esanders <esand...@wikimedia.org>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to