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-id matching the Tooltip's ID.
- An element's
data-tooltip-id changes. (reference)
- The element is marked for removal. (reference)
- The element is removed from the set of anchors. (reference)
activeAnchor is no longer in the list of anchors. (reference)
activeAnchor resets 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
Bug description
When the
data-tooltip-idvalue changes on an element while the pointer is over it, timeouts and state are not being cleared.data-tooltip-idmatching theTooltip's ID.data-tooltip-idchanges. (reference)activeAnchoris no longer in the list of anchors. (reference)activeAnchorresets to the first item in the set of anchors. (reference)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:
Additional context
N/A