# Focus on Text Box in Embedded view does not fire

**URL:** <https://forum.inductiveautomation.com/t/focus-on-text-box-in-embedded-view-does-not-fire/54286>\
**Category:** Ignition\
**Tags:** ignition80\
**Created:** [December 19, 2021, 7:22pm UTC](https://forum.inductiveautomation.com/t/focus-on-text-box-in-embedded-view-does-not-fire/54286 "2021-12-19T19:22:02Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![jespinmartin1](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/jespinmartin1/32/57175_2.png) [@jespinmartin1](https://forum.inductiveautomation.com/u/jespinmartin1)\
**Post date:** [December 20, 2021, 12:33am UTC](https://forum.inductiveautomation.com/t/focus-on-text-box-in-embedded-view-does-not-fire/54286/2 "2021-12-20T00:33:50Z")

</div>

I think ones I read that the instant script flow control is asynchronous, and you can not really control the order of execution.

Have you tried to set focus in _onStartup_ event? I would try to put the script in the view or in the component itself.

Regarding the _sleep_ action, I would use instead:

```auto
from threading import Timer
def focus():
     self.focus()
Timer(0.5, focus).start()

```

---

_[View the full topic](https://forum.inductiveautomation.com/t/focus-on-text-box-in-embedded-view-does-not-fire/54286)._
