Merge "Chain scroll calls instead of just calling after each other"

This commit is contained in:
jenkins-bot 2022-08-15 07:50:49 +00:00 committed by Gerrit Code Review
commit 254b14f3bf

View file

@ -469,9 +469,11 @@ ve.ui.MWTransclusionOutlineTemplateWidget.prototype.onToggleUnusedFields = funct
} }
if ( !visibility && fromClick ) { if ( !visibility && fromClick ) {
this.header.scrollElementIntoView(); var self = this;
if ( this.parameterList ) { this.header.scrollElementIntoView().then( function () {
this.parameterList.ensureVisibilityOfFirstCheckedParameter(); if ( self.parameterList ) {
} self.parameterList.ensureVisibilityOfFirstCheckedParameter();
}
} );
} }
}; };