mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-14 18:15:19 +00:00
Add 'vector-body' hack to TargetWidgets
Bug: T313221 Change-Id: I06366d4601342435b70d311742ee985e01b0477b
This commit is contained in:
parent
684a69c17e
commit
33546466eb
|
@ -17,7 +17,14 @@
|
|||
* @cfg {string[]} [surfaceClasses] Surface classes to apply
|
||||
*/
|
||||
ve.ui.MWTargetWidget = function VeUiMWTargetWidget( config ) {
|
||||
this.surfaceClasses = config.surfaceClasses;
|
||||
this.surfaceClasses = ve.copy( config.surfaceClasses ) || [];
|
||||
|
||||
// HACK: T287733
|
||||
// This assumes the target widget is being shown outside of vector-body, otherwise this
|
||||
// will apply the class a second time and cause problems.
|
||||
if ( mw.config.get( 'skin' ) === 'vector' || mw.config.get( 'skin' ) === 'vector-2022' ) {
|
||||
this.surfaceClasses.push( 'vector-body' );
|
||||
}
|
||||
|
||||
// Parent constructor
|
||||
ve.ui.MWTargetWidget.super.apply( this, arguments );
|
||||
|
|
Loading…
Reference in a new issue