How to get component with focus

Hi.

How can I get which component (textfield) has focus in some panel?

Thx,
ivan

In short, you can’t. The focus state is not communicated back to the server. You can only set the focus on the server.

It might be possible (with a rough amount of trickery) to make a small transparent widget yourself that captures all focus events on the client and then passes that info back to the server.

Found two tickets that relate to this issue:
1364
and
1394
. Feel free to comment on those tickets your opinions.

Thanks for info.

I commented on ticket.

I short, I understand why there this is hard to do, but hidding client side from web developer is what makes vaadin so unique.

For everybody looking for a solution anymore (Vaadin+JavaScript):

https://github.com/lgoio/VaadinActiveElement