-
-
Notifications
You must be signed in to change notification settings - Fork 534
Open
Labels
Description
Bug description
When the data-tooltip-id value changes on an element while the pointer is over it, timeouts and state are not being cleared.
- The pointer is over an element with a
data-tooltip-idmatching theTooltip's ID. - An element's
data-tooltip-idchanges. (reference) - The element is marked for removal. (reference)
- The element is removed from the set of anchors. (reference)
activeAnchoris no longer in the list of anchors. (reference)activeAnchorresets to the first item in the set of anchors. (reference)- In progress timeouts and state are applied to the new anchor. When using tooltips with show delays, this results in a tooltip appearing on the active anchor, which is not the hovered element.
I believe the fix is to apply the same clearing logic as is applied when the active anchor is removed from the DOM (reference), but I may be missing something.
Version of Package
v5.30.0
To Reproduce
I haven't found a consistent reproduction of this issue.
Expected behavior
When an element's data-tooltip-id, the state of the tooltip should adjust accordingly.
Screenshots
Example issue:
Desktop:
- OS: Mac OS 15.6.1
- Browser: Chrome
- Version: 142.0.7444.60 (arm64)
- Frameworks: React 18.2.0
Additional context
N/A