You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After the page is loaded, hovering the Avatar does not display tooltip. (The tooltip is only visible if the mouse cursor is above the Avatar when the component is first rendered, but after that the tooltip is not displayed again.)
Expected outcome
I would expect that the tooltip is displayed, because the Avatar is configured with setTooltipEnabled(true).
Minimal reproducible example
Avatar avatar = new Avatar();
avatar.setAbbreviation("A");
avatar.setName("name");
avatar.setTooltipEnabled(true);
add(avatar);
Started looking into this. The tooltip overlay only shows if the target element (avatar in this case) is considered fully visible. For avatar that can be problematic, as avatar uses a negative margin to compensate for a possible outline. So if the avatar is positioned at the edge of its scroll container it is not considered fully visible and the tooltip doesn't show.
Workarounds should be to either add a margin to the container, or remove the negative margin from the avatar.
Activity
sissbruecker commentedon May 31, 2023
Started looking into this. The tooltip overlay only shows if the target element (avatar in this case) is considered fully visible. For avatar that can be problematic, as avatar uses a negative margin to compensate for a possible outline. So if the avatar is positioned at the edge of its scroll container it is not considered fully visible and the tooltip doesn't show.
Workarounds should be to either add a margin to the container, or remove the negative margin from the avatar.