setSelectionRange is not a function

Ionic 4

I want to try to change the cursor position in an input field like this:

HTML
 <ion-input #urlInput (ionFocus)="onFocus()" type="text" formControlName="url"  autocorrect="off" autocapitalize="none"></ion-input>


COMPONENT
  @ViewChild('urlInput', { read: ElementRef }) inputRef;

onFocus(){
  const element = this.inputRef.nativeElement as HTMLInputElement;
  element.setSelectionRange(0,0);
}

But the console gives the following error: setSelectionRange is not a function
Anyone get any idea how to fix this???

Doesn’t look like setSelectionRange is a thing, I find no references in the repo https://github.com/ionic-team/ionic/search?q=setSelectionRange&unscoped_q=setSelectionRange

Also note, as of beta.7, I think, if you would like to use core feature you should not use { read: ElementRef } anymore, except if you really want to access the native element

So something like the following I guess:

 import {Input} from '@ionic/angular';
  
 @ViewChild('urlInput') inputRef: Input;