Tooltip of Grid cell "freezes" if grid data is updated
I am having problems with tooltips for cells inside a Grid. For this I created a column using the ComponentRenderer with a value provider such as this:
ValueProvider<Model, Label> componentFactory = model -> {
Label label = new Label(model.getSomeData());
Tooltips.getCurrent().setTooltip(label, "test");
return label;
};
The tooltip is properly displayed, but we have a thread that periodically updates the grids data (via the dataprovider refresh methods). As soon as this happens, the tooltip "freezes", i.e. moving the mouse away from the cell does not hide/remove it. It is removed only by clicking somewhere.
None of my attempts to close (exactly) this tooltip worked, including adding a detach listener to the label that removes the tooltip. I later noticed that the Tooltips
class already registers a listener for this. As far as I can see that listener is called, but does not close the tooltip. The .tippy-popper div
is never removed from the page. If I open another tooltip, there will be two .tippy-popper div
s (is that correct?).
Am I doing something wrong? Can you reproduce the issue? I am using Vaadin 14.1.17 and Tooltip 1.4.4.
P.S.: I found a workaround you suggested in another issue, which closes all open tooltips, but I would prefer tooltips to be automatically removed if their component is removed.