-
-
Notifications
You must be signed in to change notification settings - Fork 536
Closed
Labels
BugV6It might get fixed/merged before, but most likely only on V6's release.It might get fixed/merged before, but most likely only on V6's release.
Description
Bug description
I render the contents of the tooltip using the render prop of the Tooltip component
when quickly moving the cursor between two elements, situations arise when activeAnchor argument refers to one element and content argument contains data-tooltip-content from another element.
Version of Package
v5.25.0
To Reproduce
I used an example from here: https://github.com/ReactTooltip/react-tooltip/blob/master/docs/docs/examples/render.mdx
I only changed props of the Tooltip component:
<Tooltip
id="my-tooltip"
// delayShow={500}
// delayHide={20}
render={({ content, activeAnchor }) => {
console.log('activeAnchor', activeAnchor, 'content', content);
return (
<span>
{`The element #${content} is currently active.`}
<br />
Relevant attribute:
{activeAnchor?.getAttribute('data-some-relevant-attr') || 'not set'}
{content == 1 ? <><br />ddd</> : ''}
</span>
);
}}
/>
Expected behavior
the data-tooltip-content attribute of the activeAnchor prop should be the same as the content prop
Desktop (please complete the following information if possible or delete this section):
- OS: Windows 10 19045.3803
- Browser chrome
- Version 120.0.6099.110
- Frameworks React 18.2.0
Metadata
Metadata
Assignees
Labels
BugV6It might get fixed/merged before, but most likely only on V6's release.It might get fixed/merged before, but most likely only on V6's release.
