Blur focus of button

How do you blur the focus of a button after it is clicked in perspective? I have tried self.blur() at the end of action performed but the button still looks selected after clicking it. I want to return focus back to a text field in another embedded view but it seems that it will not happen if the button still looks selected.

The button having focus was a red herring. The actual issue is that a modal pops up and displays loading and then is closed programmically. So the issue appears to be the focus does not return to the text field after close popup is called. After I close the popup modal I can call self.focus() and the code that returns the cursor to the TextField works.

Where did you put the self.focus() call? Was it on the text box? Or the button? Or the view?

I am trying to give focus to a specific text box after closing a modal popup, and it sounds like I may need a similar solution.

Use a message handler

1 Like

That was exactly what I needed. Thanks!