Follow-up Iea7ad832: Fix context in MWPopupTool

Bug: T193043
Change-Id: I2b035a50543093988a291ea8c8958a3a7cc9e7ba
This commit is contained in:
Ed Sanders 2018-04-29 21:44:31 +01:00
parent c2bc4ee44e
commit 8fdc1f7085

View file

@ -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 = {