spectrum-web-components
spectrum-web-components copied to clipboard
[Bug]: Tooltip in ActionMenu produces SWC warning
Code of conduct
- [x] I agree to follow this project's code of conduct.
Impacted component(s)
ActionMenu, Tooltip
Expected behavior
No warning is logged when using an tooltip inside an action-menu.
Actual behavior
Currently when I use something like:
<sp-action-menu>
<sp-tooltip slot="tooltip" self-managed placement="bottom">
Your tooltip string is here
</sp-tooltip>
<span slot="label">Available shapes</span>
<sp-menu-item value="shape-1-square">Square</sp-menu-item>
<sp-menu-item value="shape-2-triangle">Triangle</sp-menu-item>
<sp-menu-item value="shape-3-parallelogram">Parallelogram</sp-menu-item>
</sp-action-menu>
this produces an SWC warning like:
Self managed <sp-tooltip> elements walk up the composed tree to acquire a trigger element. No trigger element was found before the document.
Inspect this issue in the follow element: <sp-tooltip slot="tooltip" self-managed placement="bottom" dir="ltr">…</sp-tooltip>slot
https://opensource.adobe.com/spectrum-web-components/components/tooltip#self-managed-overlays
Screenshots
What browsers are you seeing the problem in?
Chrome
How can we reproduce this issue?
- Go to https://opensource.adobe.com/spectrum-web-components/storybook/index.html?path=/story/action-menu--tooltip-description-and-placement&globals=system:spectrum-two
- Open dev console
- Check warning is logged
Sample code or abstract reproduction which illustrates the problem
No response
Severity
SEV 5
Logs taken while reproducing problem
No response
swc-890