Chain scroll calls instead of just calling after each other

Change-Id: I420fbd29ab79d6f2e1e9ef02bc3c99050126c3c8
This commit is contained in:
Thiemo Kreuz 2022-08-02 13:23:34 +02:00 committed by Thiemo Kreuz (WMDE)
parent 54d0268847
commit 89ace728a4

View file

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