I am using vaadin flow. I have a TextField with a focus listener. Somewhere in the code I call focus() to programmatically activate focus on the TextField. When I do focus() programmatically after the onFocus I need to execute some additional code.
I have tried to call focus() and then UI.getCurrent().access(…) to add additional code. The problem is that the code within access is called before the onFocus. There is a way to post some code that run will run after client events? For example with a setTimeout?