Fix context menu for mobile TargetWidgets

Depends on Ica66325a8267d14f25fbc537b956573d1d3cc336 in VE core.

Bug: T157084
Change-Id: I9d9839d7e96eb1ef254e11554acfb955750a2915
This commit is contained in:
Bartosz Dziewoński 2017-12-30 03:21:32 +01:00 committed by Jforrester
parent 0db318f462
commit 23158de319

View file

@ -115,6 +115,21 @@ ve.init.mw.MobileArticleTarget.prototype.getSaveButtonLabel = function () {
return OO.ui.deferMsg( 'visualeditor-savedialog-label-save-short' ); 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 * @inheritdoc
*/ */