Set focus for one object based on another event triggering

I want to have a field get focus when a button is clicked. This is probably dead easy - but how do I do that? :slight_smile:

I see that others have used this solution (Focus On):

But nothing happens when I do this. The field I want to have focus on is in a modal, so when the button is clicked, the button also moves the parent modal dialog into play (unhides it). But that should not matter, right? Or do I have to do some other magic for this to work?

Hello @Egil_Helland

Could you clarify what kind of modal you use? Also, will be more obvious if you create a minimal reproducible example and share it with us.

For this moment, I could only offer you a workaround. That will looks like:

image

Regards, Dima.

1 Like

I am more or less duplicating what is written up in this article:

Running with a delay like you suggested works though, so I’ll use that for now!

1 Like