Describe the bug
Focusing the Editor in ngAfterViewInit by using the built-in focus() method throws an error in the console. It seems like this happens since the view is not available at this moment and needs some time to render. This also prevents the Editor from being focused.
To Reproduce
Create an Editor component.
Use the focus() method to focus the component in the ngAfterViewInit() method.
Describe the bug Focusing the Editor in ngAfterViewInit by using the built-in focus() method throws an error in the console. It seems like this happens since the view is not available at this moment and needs some time to render. This also prevents the Editor from being focused.
To Reproduce
StackBlitz example: https://stackblitz.com/edit/angular-tipbkl-xdtnud
Expected behavior An error should not be thrown.
Screenshots
Workaround https://stackblitz.com/edit/angular-tipbkl-xaeecc