I implement a small single page in Angular. After opening a second component as a dialog window i need to focus my first input field ( & cursor should at position 1).
Current Situation: i have focus but the cursor isnt inside the field
@ViewChild('gericht') gericht: ElementRef<MatInput>;
public putInFocus() { this.gericht.nativeElement.focus(); }
Browser like chrome or firefox don't have a problem with the method .focus()
Have someone any idea? Thanks.