fix: Specifically hide tooltip, instead of using a very specific selector to show

This commit is contained in:
Sidharth Vinod
2025-05-20 15:13:38 +05:30
parent 875fef691b
commit 14e3d77c75
2 changed files with 5 additions and 3 deletions

View File

@@ -57,7 +57,7 @@ onMounted(() => {
:key="index"
:href="currentBannerSet[index].url"
target="_blank"
class="unstyled flex justify-center items-center gap-4 text-white tracking-wide plausible-event-name=bannerClick"
class="unstyled flex justify-center items-center gap-4 text-white no-tooltip tracking-wide plausible-event-name=bannerClick"
>
<span class="font-semibold">{{ currentBannerSet[index].label }}</span>
<button class="bg-[#1E1A2E] shrink-0 rounded-lg p-1.5 px-4 font-semibold tracking-wide">

View File

@@ -34,8 +34,10 @@ const hideTooltip = () => {
const handleMouseOver = (e: MouseEvent) => {
const target = e.target as HTMLElement;
if (
target.matches('a[href*="try_playground"]') ||
target.matches('button[onclick*="try_playground"]')
(target.matches('a[href*="mermaidchart.com"]') ||
target.matches('button[onclick*="mermaidchart.com"]')) &&
!target.matches('.no-tooltip') &&
!target.matches('.VPSocialLink')
) {
showTooltip(target);
}