Hooks: Don't set wgVisualEditorToolbarScrollOffset in RL when 0

We should also move this to packageFiles, but that's more work.

Bug: T220158
Change-Id: I438dc13802d744877921dc612b16cc22b0713e00
This commit is contained in:
James D. Forrester 2019-04-05 11:40:36 -07:00
parent 7f18b4b9d0
commit 4df2558910

View file

@ -71,7 +71,11 @@ class VisualEditorHooks {
if ( isset( $skinsToolbarScrollOffset[$skinName] ) ) {
$toolbarScrollOffset = $skinsToolbarScrollOffset[$skinName];
}
$output->addJsConfigVars( 'wgVisualEditorToolbarScrollOffset', $toolbarScrollOffset );
// T220158: Don't add this unless it's non-default
// TODO: Move this to packageFiles as it's not relevant to the HTML request.
if ( $toolbarScrollOffset !== 0 ) {
$output->addJsConfigVars( 'wgVisualEditorToolbarScrollOffset', $toolbarScrollOffset );
}
$output->addJsConfigVars( 'wgVisualEditorUnsupportedEditParams', self::$unsupportedEditParams );
$output->addJsConfigVars(