Skip to content

Commit

Permalink
rename contentHovered to tooltipHovered
Browse files Browse the repository at this point in the history
  • Loading branch information
benjaminknox committed Oct 30, 2023
1 parent ca46185 commit 5eb81c6
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/components/tooltip/tooltip.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
})
}
let contentHovered = false
let tooltipHovered = false
let triggerHovered = false
const handleMouseleave = (() => {
Expand All @@ -67,7 +67,7 @@
return () => {
clearTimeout(timeout)
timeout = setTimeout(() => {
if (!triggerHovered && !contentHovered) {
if (!triggerHovered && !tooltipHovered) {
setVisible(false)
}
}, 300)
Expand All @@ -85,7 +85,7 @@
}
const handleTooltipMouseleave = () => {
contentHovered = false
tooltipHovered = false
handleMouseleave()
}
Expand All @@ -107,7 +107,7 @@
{shift}
autoUpdate
on:mouseleave={handleTooltipMouseleave}
on:mouseenter={() => (contentHovered = true)}
on:mouseenter={() => (tooltipHovered = true)}
middleware={[arrowMiddleware({ padding: 0, element: arrow })]}
on:computedposition={positionArrow}
>
Expand Down

0 comments on commit 5eb81c6

Please sign in to comment.