setSelectionRange is not a function

Ionic 4

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

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

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

  const element = this.inputRef.nativeElement as HTMLInputElement;

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

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;