Skip to content

Commit

Permalink
Fix a regression in tooltip arrows
Browse files Browse the repository at this point in the history
FIX: Fix a crash when multiple tooltips with arrows are shown.

Closes codemirror/dev#1367
  • Loading branch information
marijnh committed Apr 12, 2024
1 parent 93db37d commit 28eb99a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/tooltip.ts
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ const tooltipPlugin = ViewPlugin.fromClass(class {
if (tooltip.arrow && !tooltipView.dom.querySelector(".cm-tooltip > .cm-tooltip-arrow")) {
let arrow = document.createElement("div")
arrow.className = "cm-tooltip-arrow"
tooltipView.dom.insertBefore(arrow, before)
tooltipView.dom.appendChild(arrow)
}
tooltipView.dom.style.position = this.position
tooltipView.dom.style.top = Outside
Expand Down

0 comments on commit 28eb99a

Please sign in to comment.