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.
Rapid click with slow UI updates leads to wrong event (bug?)
Hello,
Picture the following. You have a horizontal row of buttons A through D with A being the leftmost button. Clicking the A button causes the A button to be removed from the row and buttons B through D shift left. At the same time some other part of the page is updated in a heavy manner such that it takes a bit of time for the event to go to the server, modify the state, come back and rebuild the UI. If you click twice quickly on the A button and leave the mouse where it is, the first click will cause the A button to be removed leaving the B button in its place and the second click will then be fired on the B button!
It seems to me a button should not accept a second click until the server responds and certainly if I click on button A, button B should not be able to receive the event under any circumstances.
/Daryl
Hello.
Whether this is a bug is a moot point, but see Button#setDisableOnClick for the standard Vaadin approach for this issue.
Cheers,
Charles.