vaadin 7 Grid double click missing selected row

I having a trouble trying to implement an action when a row is double clicked in a Grid, when the second click happens, the row becomes “unselected” and the double click event is trigger right after so, if I do Grid.getSelctedRow() it returns NULL.

I have to select the row, THEN double click on it, so the 1st click will unselect and the 2nd will leave it selected again (total of 3 clicks).

This is a horrible framework behavior.

getGrid().addItemClickListener(evt -> {
            if (evt.isDoubleClick()) {
            itemId = g.getSelectedRow();
            if (itemId == null) {
                return null; //THIS NEVER SHOULD HAPPEN
            //doing amazing stuff

I am just wondering what is your ultimate purpose.

If you want to get the item, you could use evt.getItemId() instead, so you do not need to worry if row gets un selected.

thanks, that will solve the “double click” glitch, I want to display the form of the selected Entity, so this could be view/edited/deleted and refresh the Grid in case of changes.
I won’t be able to determinate “later” which row is selected if the state of the Grid doesn’t correlate with the event, I could have buttons around the Grid for additional actions right (alike Edit, Delete and more ), “double click” could be just for View? And if I want to know which one is the selectedRow outside an ItemClickAction.