Rapid click with slow UI updates leads to wrong event (bug?)


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.



Whether this is a bug is a moot point, but see
for the standard Vaadin approach for this issue.