From 2767c54b30557d6edd472bfbbad46f19ed8ff1e7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tu=C4=9F=C3=A7e=20K=C3=BC=C3=A7=C3=BCko=C4=9Flu?= Date: Tue, 17 Oct 2023 10:13:19 +0300 Subject: [PATCH] Fixed #3568 --- components/lib/tooltip/Tooltip.js | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/components/lib/tooltip/Tooltip.js b/components/lib/tooltip/Tooltip.js index 4b5ecc4a0..ae14a7937 100755 --- a/components/lib/tooltip/Tooltip.js +++ b/components/lib/tooltip/Tooltip.js @@ -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 {