Fix renderSpec failing to recognize DOM element and {dom, contentDOM} specs #95
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "nperez0111/prosemirror-model:main"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
In commits
042fe20a74andbb834ae103the simplification of the return type broke valid {dom, contentDOM} usage.This patch adds tests which fail on
main& the patch gets them to pass again like they should.The nodeType checks in renderSpec were incorrectly narrowed to == 3 (text nodes only), causing element nodes and {dom, contentDOM} objects to fall through to the array handling code and throw.
Issue https://github.com/ProseMirror/prosemirror/issues/1566
BlockNote Issue: https://github.com/TypeCellOS/BlockNote/issues/2751
The nodeType checks in renderSpec were incorrectly narrowed to == 3 (text nodes only), causing element nodes and {dom, contentDOM} objects to fall through to the array handling code and throw. Issue https://github.com/ProseMirror/prosemirror/issues/1566It looks like the intended check there would be
== 1. We don't want to let through any DOM node, we want to check for elements. I'm not sure how I ended up writing== 3. Could you adjust the patch to keep the test but just change the 3 to a 1?bce1686b33to10080e310810080e3108to0941fb52e6Thanks for confirmation @marijn, agreed it makes sense to be
== 1. Force pushed the patch, so this should be ready nowThanks for noticing and fixing this! That was quite a bad regression. Released as 1.25.7
No worries, it happens! We have an action runner which always runs BlockNote with the latest
prosemirrorpackages every day. So, we can catch it pretty quickly