ScrollIntoView not working on Android

I am trying to create buttons that can be used to scroll a scrollable area.

I am using document.getElementById(id).scrollIntoView(false); and it is working correctly on iOS. But when it is run on an Android device the area doesn’t scroll. Does anyone know why this would be happening?

  <ion-grid id="recentsList" class="recentsList">
                        <ion-row justify-content-center>
                            <div class="recentCol">
                                <ion-col size="12" *ngFor="let item of listOfRecents.reverse(); let i = index">
                                    <ion-button id="recentIndexId{{i}}" *ngIf=" item.length < 100 " [ngStyle]="{ 'font-family': this.fontChoiceService.currentFont} " fill="outline " class="catbuttonSmall " (click)="inputSelected(item) " wrap>{{item}} </ion-button>
scrollToElementDown() {
    console.log('error message number 5');
    if (this.currentScrollIndex < this.listOfRecents.length - 1) {
      console.log('error message number 6');
      this.currentScrollIndex = this.currentScrollIndex + 1;
    const currentIndex = this.currentScrollIndex;
    const id = 'recentIndexId' + currentIndex.toString();
    console.log('error message number 7 ', document.getElementById(id).innerHTML);

    console.log('error message number 8');

I am running Ionic 4 in Angular.

Since ionic apps don’t use document scroll to handle scrolling interactions, your approach isn’t going to work.

Use the ionContent’s scrolling methods.

You’re approach will need to change, a bit though.

Thanks for the response that’s good to know moving forward and reworking it isn’t a problem! I am curious about why it works on iOS and not on Android if it isn’t supported. Could there be something in Android that isn’t being called from Ionic?