App window focus or activation

Hello,

I am writing an app connected with a server through socket.io
The app start, connect to the server and listen for commands.
The server send a command to move the focus between a list of buttons and another command trigger the button click.

The app is perfectly working except that the .click() method over a button is not fired.

To make it work someone has to touch somewere in the app window (also a empty area) and after that everything works perfectly.

The app change the .focus() over buttons normally even in no one tapped on screen, so it seems that focus is allowed and click not (at least without the first app touch).

Any ideas?

Thank You!