Hi Garrit, great plugin. I'm using the Tooltip on a Label which is inside a

Hi Gerrit, great plugin.
I’m using the Tooltip on a Label which is inside a cell on a grid.
And when I mouse-over the cell the tooltip shows, and when I click it the tooltip hides, but it does not trigger the select event on the grid itself.

How can I fix/configure this?

Thanks man,

Hi Gustavo,

I could not reproduce the issue using the code below:

private void demoGrid() {
    Tooltips tt = Tooltips.getCurrent();

    List<GridData> data = new ArrayList<>();
    for(int i=0; i<999; i++) {
        int ranom = new Random().nextInt(i+1);
        data.add(new GridData("key " + i, String.valueOf(ranom)));
    }

    ListDataProvider<GridData> dataProvider = new ListDataProvider<>(data);

    Grid<GridData> grid = new Grid<>();
    grid.removeAllColumns();
    grid.addComponentColumn(entry -> {
        Span key = new Span(entry.getKey());
        tt.setTooltip(key, "Tooltip of " + key.getText());
        return key;
    }).setHeader("Key");
    grid.addColumn(GridData::getRandom).setHeader("Value");
    grid.setDataProvider(dataProvider);

    grid.addSelectionListener(evt -> {
        System.out.println(evt);
    });

    add(grid);
}

@Data
private static class GridData {
    private final String key;
    private final String random;
}

Do you use Vaadin 14?
Could you please provide an example that reliable produces issue?

Best Regards
Gerrit

Hi man,

Thanks for the quick reply.

It turns out I was using Label instead of Span/Div, and reading the documentation made it clear that Label should be used with Inputs so when mouse click on the Label it auto focus the input (that’s why the grid row was not being selected).

Changing from Label to Span fixed it, but I was able to spot that after you quick sample. Cheers for that!