Merge "Fix calling order in template dialog .getSetupProcess()"

This commit is contained in:
jenkins-bot 2022-08-30 13:28:51 +00:00 committed by Gerrit Code Review
commit 182eb7340e
2 changed files with 8 additions and 8 deletions

View file

@ -489,15 +489,9 @@ ve.ui.MWTemplateDialog.prototype.getSetupProcess = function ( data ) {
// Add missing required and suggested parameters to each transclusion.
dialog.transclusionModel.addPromptedParameters();
dialog.loaded = true;
dialog.$element.addClass( 've-ui-mwTemplateDialog-ready' );
dialog.$body.append( dialog.bookletLayout.$element );
if ( !dialog.transclusionModel.isSingleTemplate() ) {
dialog.sidebar.hideAllUnusedParameters();
}
dialog.sidebar.initializeAllStickyHeaderHeights();
dialog.$element.addClass( 've-ui-mwTemplateDialog-ready' );
dialog.loaded = true;
} );
}, this );
};

View file

@ -556,6 +556,12 @@ ve.ui.MWTransclusionDialog.prototype.getSetupProcess = function ( data ) {
this.updateModeActionState();
this.autoExpandSidebar();
if ( !this.transclusionModel.isSingleTemplate() ) {
this.sidebar.hideAllUnusedParameters();
}
// We can do this only after the widget is visible on screen
this.sidebar.initializeAllStickyHeaderHeights();
}, this );
};