Multiple tooltips cause plugin crash on codemirror/view ^6.24.0
valtzu opened this issue · comments
valtzu commented
Describe the issue
@codemirror/view
version 6.24.0
breaks a scenario where you have multiple tooltips and then write some specific input. See reproduction link for the case – it is a combination of cursor & hover tooltip example.
CodeMirror plugin crashed: DOMException: Failed to execute 'insertBefore' on 'Node': The node before which the new node is to be inserted is not a child of this node.
at ViewPlugin.fromClass.eventObservers.scroll.createTooltip (https://codemirror.net/try/mods/@codemirror-view.js:9469:29)
at TooltipViewManager.createTooltipView (https://codemirror.net/try/mods/@codemirror-view.js:9393:81)
at TooltipViewManager.update (https://codemirror.net/try/mods/@codemirror-view.js:9330:40)
at ViewPlugin.fromClass.eventObservers.scroll.update (https://codemirror.net/try/mods/@codemirror-view.js:9436:36)
at PluginInstance.update (https://codemirror.net/try/mods/@codemirror-view.js:2477:32)
at EditorView.updatePlugins (https://codemirror.net/try/mods/@codemirror-view.js:7291:29)
at EditorView.update (https://codemirror.net/try/mods/@codemirror-view.js:7189:22)
at EditorView.dispatchTransactions (https://codemirror.net/try/mods/@codemirror-view.js:7093:28)
at EditorView.dispatch (https://codemirror.net/try/mods/@codemirror-view.js:7115:14)
at applyDOMChange (https://codemirror.net/try/mods/@codemirror-view.js:6381:18)
console.<computed> @ sandbox.js:48
Likely breaking commit: codemirror/view@9d13d5e
Browser and platform
PC Chrome on Linux
Reproduction link
Marijn Haverbeke commented
Attached patch should fix this.
valtzu commented
Thanks! Amazing response time 😄 💯
I confirm it's working with 6.26.3
.