Move cursor/insertion point to modal on open

Hi everyone, another (hopefully) simple dev question. When I open a modal, I have to manually click into the input field in order for my cursor to appear there and be able to type. Is there a way to automatically put the cursor in the new modal on open?


Actually just answered my own question on accident.

For other developers that come across the same problem, in your onOpen() function include: