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
[BUG] 6.0.6 regression (#1278): tooltips don't resolve on non-HTMLElement anchors (SVG/MathML) — resolveDataTooltipAnchor narrowed to instanceof HTMLElement #1279
The fix for #1277 (PR #1278, released in 6.0.6) narrowed the delegated anchor resolver to instanceof HTMLElement. Any anchor whose data-tooltip-id sits on a non-HTMLElement — most commonly an <svg> icon used as a tooltip trigger — no longer resolves, so the tooltip silently never opens. This worked in 6.0.5 and earlier.
The property the resolver actually needs, dataset, is not exclusive to HTMLElement. It is provided by the HTMLOrSVGElement mixin, which is implemented by HTMLElement, SVGElement, and MathMLElement. Narrowing by the HTMLElement subclass — rather than by the dataset capability — silently drops valid SVGElement anchors today (and MathMLElement anchors as well).
Notably, the library already uses the broader form elsewhere, in isScrollable:
6.0.6: nothing happens — the anchor never matches.
Suggested fix
Match by the capability rather than a specific subclass. Keeping instanceof Element still preserves the #1277 fix (document, window, and text nodes are not Elements), and reading dataset defensively covers HTMLElement, SVGElement, MathMLElement, and any future dataset-bearing element:
Confirmed fixed on 6.0.6-beta.1280.rc.0 — thanks for the fast turnaround! 🙏
Tested the exact repro from the issue: data-tooltip-id directly on a bare <svg> (a real SVGElement, not an HTMLElement). On hover the anchor now resolves — aria-describedby gets wired to the tooltip and it shows. Works as expected. 👍
Activity
danielbarion commentedon Jun 4, 2026
@aramarakelyan88 it does make sense, and I didn't realize that. Thanks for opening the issue with those details.
Can you please test the following beta release?
Beta version released with the last commit 🚀
or
aramarakelyan88 commentedon Jun 4, 2026
Confirmed fixed on
6.0.6-beta.1280.rc.0— thanks for the fast turnaround! 🙏Tested the exact repro from the issue:
data-tooltip-iddirectly on a bare<svg>(a realSVGElement, not anHTMLElement). On hover the anchor now resolves —aria-describedbygets wired to the tooltip and it shows. Works as expected. 👍