Skip to content

Commit

Permalink
Merge pull request #14032 from maruthumj/tooltip-hover
Browse files Browse the repository at this point in the history
Bug fix: #14014 - p-tooltip : autohide="false" does not work every time
  • Loading branch information
cetincakiroglu authored Nov 15, 2023
2 parents 89a1cc5 + 0242aeb commit 004aafa
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/app/components/tooltip/tooltip.ts
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,10 @@ export class Tooltip implements AfterViewInit, OnDestroy {

onMouseLeave(e: MouseEvent) {
if (!this.isAutoHide()) {
const valid = DomHandler.hasClass(e.target, 'p-tooltip') || DomHandler.hasClass(e.target, 'p-tooltip-arrow') || DomHandler.hasClass(e.target, 'p-tooltip-text') || DomHandler.hasClass(e.relatedTarget, 'p-tooltip');
const valid =
DomHandler.hasClass(e.relatedTarget, 'p-tooltip') ||
DomHandler.hasClass(e.relatedTarget, 'p-tooltip-text') ||
DomHandler.hasClass(e.relatedTarget, 'p-tooltip-arrow');
!valid && this.deactivate();
} else {
this.deactivate();
Expand Down

1 comment on commit 004aafa

@vercel
Copy link

@vercel vercel bot commented on 004aafa Nov 15, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.