From 9da5996c0ede52598e6a06b68b2f98c0253e86cf Mon Sep 17 00:00:00 2001 From: Juan Manuel Osorio Gerdts Date: Mon, 15 Aug 2016 21:54:27 +0200 Subject: [PATCH] Fix deactivating VE after user explicitly decideas to discard changes Bug: T134794 Bug: T143042 Change-Id: Idf1941793317a6aff9fe57082b85e3ebff0c72b4 (cherry picked from commit 1ba035e053fa8867f537ba8dd9d23a8c80dffc7d) --- modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.js b/modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.js index 1a889ac9a6..1debd0bd44 100644 --- a/modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.js +++ b/modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.js @@ -499,7 +499,7 @@ ve.init.mw.DesktopArticleTarget.prototype.deactivate = function ( noDialog, trac opened.then( function ( closing ) { closing.then( function ( data ) { if ( data && data.action === 'discard' ) { - this.emit( 'deactivate' ); + target.emit( 'deactivate' ); target.cancel( trackMechanism ); } } );