Esanders has uploaded a new change for review.

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

Change subject: Clear windows when destroying window manager
......................................................................

Clear windows when destroying window manager

Windows may remove handlers or free up memory when they close
so we shouldn't destroy a window manager without properly
destroying any windows that may be open.

Change-Id: I8715a45f0ba7ba3fff8f5ac3d38a440cfaada961
---
M src/WindowManager.js
1 file changed, 1 insertion(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/oojs/ui refs/changes/12/182812/1

diff --git a/src/WindowManager.js b/src/WindowManager.js
index 7021946..1f65e3a 100644
--- a/src/WindowManager.js
+++ b/src/WindowManager.js
@@ -690,11 +690,10 @@
 
 /**
  * Destroy window manager.
- *
- * Windows will not be closed, only removed from the DOM.
  */
 OO.ui.WindowManager.prototype.destroy = function () {
        this.toggleGlobalEvents( false );
        this.toggleAriaIsolation( false );
+       this.clearWindows();
        this.$element.remove();
 };

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I8715a45f0ba7ba3fff8f5ac3d38a440cfaada961
Gerrit-PatchSet: 1
Gerrit-Project: oojs/ui
Gerrit-Branch: master
Gerrit-Owner: Esanders <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to