Skip to content

Commit

Permalink
Clean up wrappers created for tooltips when the parent option is given
Browse files Browse the repository at this point in the history
FIX: Fix an issue that caused the tooltip system to leave empty nodes in the DOM when an
editor using the `parent` option to `tooltips` is destroyed.

Closes codemirror/dev#1253
  • Loading branch information
marijnh committed Sep 15, 2023
1 parent 1d31434 commit 110c3bd
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/tooltip.ts
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,7 @@ const tooltipPlugin = ViewPlugin.fromClass(class {
tooltipView.dom.remove()
tooltipView.destroy?.()
}
if (this.parent) this.container.remove()
this.intersectionObserver?.disconnect()
clearTimeout(this.measureTimeout)
}
Expand Down

0 comments on commit 110c3bd

Please sign in to comment.