Skip to content

Commit

Permalink
Fix #6008: Tooltip - stuck when several tooltips and targets are used…
Browse files Browse the repository at this point in the history
… together
  • Loading branch information
Artem Andreev committed Jan 10, 2025
1 parent 33be9ca commit 38190f8
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion components/lib/tooltip/Tooltip.js
Original file line number Diff line number Diff line change
Expand Up @@ -219,11 +219,13 @@ export const Tooltip = React.memo(
ZIndexUtils.clear(elementRef.current);
DomHandler.removeClass(elementRef.current, 'p-tooltip-active');

setVisibleState(false);
sendCallback(props.onHide, { originalEvent: e, target: currentTargetRef.current });
});
}
}

// handles the case when visibleState change from mouseenter was queued and mouseleave handler was called earlier than queued re-render
setVisibleState(false);
};

const align = (target, coordinate, position) => {
Expand Down

0 comments on commit 38190f8

Please sign in to comment.