From a163ad768364400c48ea7fa024fde2c639cded75 Mon Sep 17 00:00:00 2001 From: Toby Zerner Date: Thu, 29 Jun 2023 10:04:37 +0930 Subject: [PATCH] fix(tooltip): clean up tooltip positioner on disconnect --- src/tooltip/tooltip.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/tooltip/tooltip.ts b/src/tooltip/tooltip.ts index 47feaf2..1761955 100644 --- a/src/tooltip/tooltip.ts +++ b/src/tooltip/tooltip.ts @@ -49,6 +49,8 @@ export default class TooltipElement extends HTMLElement { } public disconnectedCallback(): void { + this.cleanup?.(); + if (this.tooltip) { this.tooltip.remove(); this.tooltip = undefined;