Scroll position between ion-slider slides

I’m using an ion-segment to trigger a slideTo on an ion-slides element, the function works ok all except one thing, it looks like the Y position is preserved between slides, so, scrolling to the bottom of a long list on slide A puts you way below the content of a shorter list on slide B.

I’ve added a few things to help with explaining this issue…

REPO: GitHub - p4u1d34n/ionicEmpty: Ionic Empty Project
SO Question : scrolltop - ion-slides showing below the content ionic 5 - Stack Overflow

Is it a bug?

… no doubt im missing something simple that will help, but i just dont know what it could be.

AHH!! I found it…


I need to add these bits…

import { IonContent } from ‘@ionic/angular’;
@ViewChild(IonContent) content: IonContent;

and change the function to this

changeSegment(ev: any) {
this.view = this.sliderindex.indexOf(ev.detail.value);