How to set focus on a Textbox

There are events for capturing .blur and .focus but how do you set focus on a particular Textbox?

To simplify, I am building an interface having two Textboxes.
The 1st Textbox will will receive a value from an API. This works nicely.
Next I want to set focus on the 2nd Textbox, so that the user immediately can add a comment. This does not work.

I have tried to update properties like autofocus for the 2nd Textbox using .then() after the 1st Textbox has been changed by the API, but it does not automatically put the cursor in the text field.