Is widget.spec destroy called when the editor is destroyed?

I’d think yes, but the docs suggest otherwise if interpreted entirely literally.

https://prosemirror.net/docs/ref/#view.Decoration^widget^spec.destroy

destroy⁠?: fn(node: DOMNode) Called when the widget decoration is removed as a result of mapping

Yes, it should be. I’ve improved the doc comment a bit.

1 Like