Skip to content

Commit

Permalink
fix(tooltip): clean up tooltip positioner on disconnect
Browse files Browse the repository at this point in the history
  • Loading branch information
tobyzerner committed Jun 29, 2023
1 parent f9f0cf8 commit a163ad7
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/tooltip/tooltip.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ export default class TooltipElement extends HTMLElement {
}

public disconnectedCallback(): void {
this.cleanup?.();

if (this.tooltip) {
this.tooltip.remove();
this.tooltip = undefined;
Expand Down

0 comments on commit a163ad7

Please sign in to comment.