Skip to content

Commit

Permalink
Fixed #3568
Browse files Browse the repository at this point in the history
  • Loading branch information
tugcekucukoglu committed Oct 17, 2023
1 parent 5b876be commit 2767c54
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions components/lib/tooltip/Tooltip.js
Original file line number Diff line number Diff line change
Expand Up @@ -152,16 +152,17 @@ const Tooltip = BaseTooltip.extend('tooltip', {
onMouseLeave(event) {
const el = event.currentTarget;
const hideDelay = el.$_ptooltipHideDelay;

const autoHide = el.$_ptooltipAutoHide;

if (!autoHide) {
const valid =
DomHandler.hasClass(event.target, 'p-tooltip') ||
DomHandler.hasClass(event.target, 'p-tooltip-arrow') ||
DomHandler.hasClass(event.target, 'p-tooltip-text') ||
DomHandler.hasClass(event.relatedTarget, 'p-tooltip') ||
DomHandler.hasClass(event.relatedTarget, 'p-tooltip-text') ||
DomHandler.hasClass(event.relatedTarget, 'p-tooltip-arrow');
DomHandler.getAttribute(event.target, 'data-pc-name') === 'tooltip' ||
DomHandler.getAttribute(event.target, 'data-pc-section') === 'arrow' ||
DomHandler.getAttribute(event.target, 'data-pc-section') === 'text' ||
DomHandler.getAttribute(event.relatedTarget, 'data-pc-name') === 'tooltip' ||
DomHandler.getAttribute(event.relatedTarget, 'data-pc-section') === 'arrow' ||
DomHandler.getAttribute(event.relatedTarget, 'data-pc-section') === 'text';

!valid && this.hide(el, hideDelay);
} else {
Expand Down

0 comments on commit 2767c54

Please sign in to comment.