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
{{ message }}
Repository navigation
[EuiTooltip] Scrolls off the anchor upon page or parent scroll #5604
EuiTooltip attached to a button scrolls off the button when parent is scrolled. This might be only happening when the anchor element is itself on a popover. As is the below snapshot, the tooltip is attached to a button where the button is inside an overlay container (bottom sheet).
Implement a prop repositionOnScroll on EuiTooltip which should reposition the tooltip when scrolled. EuiPopover already implements it, see. Also see RepositionScrollStrategy in Angular CDK Overlay.
Proposal 2:
Implement a prop hideOnScroll on EuiTooltip (and maybe also on EuiPopover) that when set to true, hides the tooltip when any scroll event happens in the scope of window. See CloseScrollStrategy in Angular CDK Overlay.
changed the title [-]EuiTooltip scrolls off the anchor upon page or parent scroll[/-][+][EuiTooltip] Scrolls off the anchor upon page or parent scroll[/+]on Feb 4, 2022
Just noting (after a refresher in the code) that EuiToolTip does not use EuiPopover, but instead uses one of its utils and mimics the behavior with EuiPortal + EuiToolTipPopover.
Unless someone already has context on why this was done and whether it's still necessary/desired, it's probably worth exploring whether using EuiPopover is possible.
In that case, we could just pass through the repositionOnScroll prop.
Another option is to extract the positionPopover method from EuiPopover and make it available elsewhere as a util.
The tooltip & popover components existed before popover's positioning logic came to be; that change never made its way into tooltips.
TBH the reposition logic should probably be on by default, it creates a small overhead during scroll (and browsers try to limit potential blocking of the UI) but it'd be better to not have the popover/tooltip fly away from its anchor.
👋 Hey there. This issue hasn't had any activity for 180 days. We'll automatically close it if that trend continues for another week. If you feel this issue is still valid and needs attention please let us know with a comment.
Activity
[-]EuiTooltip scrolls off the anchor upon page or parent scroll[/-][+][EuiTooltip] Scrolls off the anchor upon page or parent scroll[/+]thompsongl commentedon Feb 4, 2022
Just noting (after a refresher in the code) that
EuiToolTipdoes not useEuiPopover, but instead uses one of its utils and mimics the behavior withEuiPortal+EuiToolTipPopover.Unless someone already has context on why this was done and whether it's still necessary/desired, it's probably worth exploring whether using
EuiPopoveris possible.In that case, we could just pass through the
repositionOnScrollprop.Another option is to extract the
positionPopovermethod fromEuiPopoverand make it available elsewhere as a util.chandlerprall commentedon Feb 8, 2022
The tooltip & popover components existed before popover's positioning logic came to be; that change never made its way into tooltips.
TBH the reposition logic should probably be on by default, it creates a small overhead during scroll (and browsers try to limit potential blocking of the UI) but it'd be better to not have the popover/tooltip fly away from its anchor.
github-actions commentedon Aug 8, 2022
👋 Hey there. This issue hasn't had any activity for 180 days. We'll automatically close it if that trend continues for another week. If you feel this issue is still valid and needs attention please let us know with a comment.
thompsongl commentedon Aug 18, 2022
Had another report of this behavior today. Remains not high priority at the moment, but adding a label to ensure it doesn't get lost.
shahzad31 commentedon Dec 28, 2022
Team, can we please priorities fix for this? it's annoying when this happens.
shahzad31 commentedon Dec 28, 2022
There is a simple workaround though. If you change tooltip key, when it's disabled etc it will force re-render. that seems to resolve the issue.
daveyholler commentedon Jan 9, 2023
We've prioritized this issue and labeled it as a bug.
cee-chen commentedon Jan 10, 2023
This has been resolved in #6515 - as of the next release/Kibana upgrade, you'll be able to add
<EuiToolTip repositionOnScroll>to get this working!lizaemran commentedon Feb 23, 2024
I added repositionOnScroll on my EuiPopover but it repositions after a delay which does not look very nice