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.

Vaadin lets you build secure, UX-first PWAs entirely in Java.
Free ebook & tutorial.
retrieve the cursor in another window. VAADIN
Hello,
I have a form with a button "Submit". By pressing the button, if the fields are not filled, I create a popup to display an error message. it works well.
The problem is that this popup has a button "OK" to leave the popup, but it isn't selected by default. And if I press enter on the keyboard for x times, it displays x new popup.
Thank you in advance for your help.
When you open the popup call focus() on the "OK"-button.
I forgot to put : dialog.addComponent(close);
that's why I could not have done : close.focus();