Skip to content

Commit 758df51

Browse files
fix: check if target is connected before handling click outside
1 parent e48db29 commit 758df51

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/components/Tooltip/Tooltip.tsx

+3
Original file line numberDiff line numberDiff line change
@@ -363,6 +363,9 @@ const Tooltip = ({
363363
return
364364
}
365365
const target = event.target as HTMLElement
366+
if (!target.isConnected) {
367+
return
368+
}
366369
if (tooltipRef.current?.contains(target)) {
367370
return
368371
}

0 commit comments

Comments
 (0)