Add mw-body-content to surface element

VisualEditor recreates the mw-body-content element. The element
with mw-parser-output already exists as a child. All skins now
consistently follow this pattern.

To limit the impact to the editor, we use ArticleTarget and add the class
to the surface, which corresponds to the mw-body-content element of a skin.
This avoids unrelated regressions in experiences such as DiscussionTools.

Bug: T283014
Change-Id: I4833d1ca9fda4fc0bd433760e47fe7010f00db05
This commit is contained in:
jdlrobson 2021-05-17 11:52:19 -07:00 committed by Esanders
parent a01b56bcf1
commit 2a40996cb7

View file

@ -1608,7 +1608,9 @@ ve.init.mw.ArticleTarget.prototype.createSurface = function ( dmDoc, config ) {
// * mw-textarea-proteced
// * mw-textarea-cproteced
// * mw-textarea-sproteced
surface.$element.addClass( this.protectedClasses );
surface.$element
.addClass( this.protectedClasses )
.addClass( 'mw-body-content' );
return surface;
};