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] Tooltip should adjust its position when the anchor element moves #8266
Describe the bug
When a tooltip is anchored to an element (e.g. button) that is fixed-positioned and that changes positions when clicked, the tooltip won't follow. This creates an unwanted state where the tooltip is visible but not correctly positioned.
The repositionOnScroll prop does not help in this case, because there is no scrolling involved. The position that changes is the anchor's (button), not the scroll.
Impact and severity
I don't think it's common pattern to have a button fixed-positioned, that moves as it gets clicked, but this issue was reported so it should have some end-user impact.
Environment and versions
EUI version: 99.0.0
React version: 18
Kibana version (if applicable): ~
Browser: ~
Operating System: ~
To Reproduce
You need a button that:
uses EuiToolTip
has position: fixed (or absolute)
changes position when it gets clicked
Expected behavior
The tooltip element should adjust its position to follow its anchor.
We may be able to solve this by adding a dismiss callback, which would let consumers programatically dismiss tooltips. That would solve this particular use case indirectly.
👋 Hi there - this issue hasn't had any activity in 6 months. If the EUI team has not explicitly expressed that this is something on our roadmap, it's unlikely that we'll pick this issue up. We would sincerely appreciate a PR/community contribution if this is something that matters to you! If not, and there is no further activity on this issue for another 6 months (i.e. it's stale for over a year), the issue will be auto-closed.
@alexmarhaba the anchor functionality that Arturo is mentioning ☝🏻 would greatly improve the tooltips. Could be worth, as part of the component sweep, to spike out if we can already use this API, which would potentially resolve this issue.
Activity
JasonStoltz commentedon Jan 14, 2025
We may be able to solve this by adding a dismiss callback, which would let consumers programatically dismiss tooltips. That would solve this particular use case indirectly.
JasonStoltz commentedon Jan 14, 2025
@acstll You had some thoughts about anchoring, could you add them here as well?
acstll commentedon Jan 14, 2025
The new CSS
anchor()APIanchor()on MDNvera commentedon Feb 18, 2025
We've noticed this bug as well. However, we are not using a button with
position: fixedorabsolute.In our case, the button moves because other DOM elements are inserted before it due to the button click.
I've created a sandbox showing that here: https://codesandbox.io/p/sandbox/peaceful-voice-229s4j
Screencast.from.18.02.2025.15.52.59.webm
The code sandbox also includes a hack/fix to close the tooltip after the button click, so the bug doesn't become visible.
To close the tooltip, unfocus the button by calling
blurin theonClickfunction:(cc @julian-schneider who found the fix)
github-actions commentedon Nov 1, 2025
👋 Hi there - this issue hasn't had any activity in 6 months. If the EUI team has not explicitly expressed that this is something on our roadmap, it's unlikely that we'll pick this issue up. We would sincerely appreciate a PR/community contribution if this is something that matters to you! If not, and there is no further activity on this issue for another 6 months (i.e. it's stale for over a year), the issue will be auto-closed.
acstll commentedon Nov 5, 2025
related: #7102
weronikaolejniczak commentedon Mar 20, 2026
@alexmarhaba the anchor functionality that Arturo is mentioning ☝🏻 would greatly improve the tooltips. Could be worth, as part of the component sweep, to spike out if we can already use this API, which would potentially resolve this issue.
weronikaolejniczak commentedon Apr 28, 2026
@kfirpeled @vera Both of your cases seem to happen because the tooltip is persisted after a mouse click. After [EuiToolTip] Tooltips on buttons persist after clicking #9520 is merged that should no longer be the case.
weronikaolejniczak commentedon May 6, 2026
The issue has been addressed and the fix released on v115.0.0.
@kfirpeled the change will be added to Kibana by EOW.