Important Notice - Forums is archived
To simplify things and help our users to be more productive, we have archived the current forum and focus our efforts on helping developers on Stack Overflow. You can post new questions on Stack Overflow or join our Discord channel.

TUTORIALVaadin lets you build secure, UX-first PWAs entirely in Java.
Vaadin lets you build secure, UX-first PWAs entirely in Java.
Free ebook & tutorial.
Calling javascript synchronously by Enver Haase, 1 day ago
Avoid buttons tacking focus
Is it possible to avoid buttons to take focus.
When my applications shows very often the a button is the fisrt component in the layout an it takes focus but I want the focus setted in the first text field (or combo) in the layout.
Is it possible ? How ?
Tks
Last updated on
You can programmatically set the focus to a field, e.g.
textfield.focus();
Last updated on
I tried but it doesn't work, I don't understand why.
Any suggestion ?
Tks
Last updated on
Not without seeing some code. Try to make as simple as possible test case that reproduces the problem.
Last updated on
You cannot reply to this thread.