If you’re certain that both the selectors for the scene ID and view ID are correct, you can add a delay before executing the focus() function. It is recommended to use the input’s ID instead of the ‘view_id input’.
Thanks Josh. The input field is a search box in a popup window. I can’t determine what the id is. I also tried using a timer with the code but it still didn’t work. Thanks for taking a look.