Esanders has uploaded a new change for review.

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

Change subject: Move event unbinding to teardown process
......................................................................

Move event unbinding to teardown process

Change-Id: I6fae2ca3e1bc02b8edb707b4248b884a9f022c3f
---
M modules/ve-mw/ui/inspectors/ve.ui.MWLiveExtensionInspector.js
1 file changed, 10 insertions(+), 1 deletion(-)


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

diff --git a/modules/ve-mw/ui/inspectors/ve.ui.MWLiveExtensionInspector.js 
b/modules/ve-mw/ui/inspectors/ve.ui.MWLiveExtensionInspector.js
index 1cffebb..69c6a38 100644
--- a/modules/ve-mw/ui/inspectors/ve.ui.MWLiveExtensionInspector.js
+++ b/modules/ve-mw/ui/inspectors/ve.ui.MWLiveExtensionInspector.js
@@ -87,10 +87,19 @@
 /**
  * @inheritdoc
  */
+ve.ui.MWLiveExtensionInspector.prototype.getTeardownProcess = function ( data 
) {
+       return 
ve.ui.MWLiveExtensionInspector.super.prototype.getTeardownProcess.call( this, 
data )
+               .first( function () {
+                       this.input.off( 'change', this.onChangeHandler );
+               }, this );
+};
+
+/**
+ * @inheritdoc
+ */
 ve.ui.MWLiveExtensionInspector.prototype.insertOrUpdateNode = function () {
        // No need to call parent method as changes have already been made
        // to the model in staging, just need to apply them.
-       this.input.off( 'change', this.onChangeHandler );
        this.getFragment().getSurface().applyStaging();
 };
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I6fae2ca3e1bc02b8edb707b4248b884a9f022c3f
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/VisualEditor
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