diff --git a/modules/ve-mw/init/targets/ve.init.mw.MobileArticleTarget.js b/modules/ve-mw/init/targets/ve.init.mw.MobileArticleTarget.js index 9c5dec82ae..10a31ff9d0 100644 --- a/modules/ve-mw/init/targets/ve.init.mw.MobileArticleTarget.js +++ b/modules/ve-mw/init/targets/ve.init.mw.MobileArticleTarget.js @@ -115,6 +115,21 @@ ve.init.mw.MobileArticleTarget.prototype.getSaveButtonLabel = function () { return OO.ui.deferMsg( 'visualeditor-savedialog-label-save-short' ); }; +/** + * @inheritdoc + */ +ve.init.mw.MobileArticleTarget.prototype.createTargetWidget = function ( config ) { + // Parent method + var targetWidget = ve.init.mw.MobileArticleTarget.super.prototype.createTargetWidget.call( this, config ); + + targetWidget.once( 'setup', function () { + // Append the context to the toolbar + targetWidget.getToolbar().$bar.append( targetWidget.getSurface().getContext().$element ); + } ); + + return targetWidget; +}; + /** * @inheritdoc */