Hi Gerrit, made quick example: tooltip sometimes does not appear on element after being showed:
Thanks!
<java.version>1.8</java.version>
<vaadin.version>14.7.2</vaadin.version>
@Route
public class MainView extends VerticalLayout {
public MainView() {
for (int i = 0; i < 10; i++) {
Button myButton = new MyButton();
Button show = new Button("Show", e -> myButton.setVisible(true));
add(new HorizontalLayout(show, myButton));
}
}
private static class MyButton extends Button implements HasTooltip {
public MyButton() {
setIcon(VaadinIcon.VAADIN_H.create());
setTooltip("Tooltip");
setVisible(false);
}
}
}
thx
You can see how it works in Chrome with F12 - Network tab
Once the page is loaded, 2-5 seconds later all visible tooltips at this moment will be ok-inited. Invisible will be broken until the page is reloaded.
The issue arises because the non visible component receives a DOM element (and therefore triggers its lifecycle hooks) but does not reflect its attributes.
Im looking into workarounds but it appears to be problematic atm.
Do you know of any hooks related to the visibility of a component?
Maybe Im blind :)