mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-12-12 06:27:01 +00:00
Add an <html> class for the current surface's mode
Change-Id: I167a460e129969f1e25dde717df5f3cb4b67b34e
This commit is contained in:
parent
6d4caef304
commit
3a2df21703
|
@ -424,7 +424,12 @@ ve.init.mw.DesktopArticleTarget.prototype.activate = function ( dataPromise ) {
|
|||
* Edit mode has finished activating
|
||||
*/
|
||||
ve.init.mw.DesktopArticleTarget.prototype.afterActivate = function () {
|
||||
$( 'html' ).removeClass( 've-activating' ).addClass( 've-active' );
|
||||
// eslint-disable-next-line mediawiki/class-doc
|
||||
$( 'html' )
|
||||
// Remove ve-activating when loading for the first time,
|
||||
// and when switching remove previous mode's class.
|
||||
.removeClass( 've-activating ve-active-visual ve-active-source' )
|
||||
.addClass( 've-active ve-active-' + this.getSurface().getMode() );
|
||||
|
||||
// Disable TemplateStyles in the original content
|
||||
// (We do this here because toggling 've-active' class above hides it)
|
||||
|
|
Loading…
Reference in a new issue