table selection on mouse button release

Table selection is made when I release the mouse button. Can I change this behaviour so that the selection is made when I click on the item?

For example:
if I click on the first item and holding the mouse button pressed I move to the last item and then release the mouse button, I will end up with the last item being selected. I want the first item to get selection in that case.

Any ideas, please?

I generally don’t think the user would want either row to get selected in that case. If you move the mouse after pressing a mouse button you expect a drag and drop action or nothing at all. Moving the mouse out from a button before releasing the mouse button cancels clicking that button in all native UIs.

The behavior of most click handling in the framework was recently changed through ticket
#4120
which is included in the recently released Vaadin 6.7.10 and Vaadin 6.8.0 and all subsequent releases. I have not tested you particular use case, but I think the changes in #4120 will make it so that none of the rows are selected.

I’ve just checked with the latest Vaadin 6.8.0 and it’s still the same so mouse-up makes table selection. You are right that expected and the best thing would be if that mouse click is cancelled in that case.

Hopefully it will get changed (fixed?) in the future. But for now, can anyone think about some workaround?

In that case, I’d suggest you create a ticket for the issue at
http://dev.vaadin.com
.

I can’t come up with any other good way of changing this than making the proper change directly to the VScrollTable event handling code.

Thanks for your help Leif. I have created a new ticket
#8939