From 8fdc1f7085e202b2ed47849c44c8115f7164a79b Mon Sep 17 00:00:00 2001 From: Ed Sanders Date: Sun, 29 Apr 2018 21:44:31 +0100 Subject: [PATCH] Follow-up Iea7ad832: Fix context in MWPopupTool Bug: T193043 Change-Id: I2b035a50543093988a291ea8c8958a3a7cc9e7ba --- modules/ve-mw/ui/tools/ve.ui.MWPopupTool.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/ve-mw/ui/tools/ve.ui.MWPopupTool.js b/modules/ve-mw/ui/tools/ve.ui.MWPopupTool.js index 33bd627b25..589f2eaed2 100644 --- a/modules/ve-mw/ui/tools/ve.ui.MWPopupTool.js +++ b/modules/ve-mw/ui/tools/ve.ui.MWPopupTool.js @@ -193,11 +193,12 @@ ve.ui.MWHelpPopupTool.static.autoAddToGroup = false; * Handle clicks on the feedback button. */ ve.ui.MWHelpPopupTool.prototype.onFeedbackClick = function () { + var tool = this; this.popup.toggle( false ); if ( !this.feedbackPromise ) { this.feedbackPromise = mw.loader.using( 'mediawiki.feedback' ).then( function () { var feedbackConfig, veConfig, - mode = this.toolbar.getSurface().getMode(); + mode = tool.toolbar.getSurface().getMode(); // This can't be constructed until the editor has loaded as it uses special messages feedbackConfig = {