Possible regression in `splitListItem`? (prosemirror-schema-list)

Demonstration: https://glitch.com/edit/#!/harvest-berry?path=index.js:66:0

I suspect that this is rather a failing of my own schema, rather than a failing in the library, but I’m at a bit of a loss as to why.

The specific failure I’m seeing is that calling splitListItem when the cursor (or selection!) is at the very end of a list item no longer works. In practice, this seems to be because the change in v1.0.2 is now returning a different nodeType, which canSplit is declaring impossible to resolve.

I can certainly work around this, but wanted to raise the issue here in case this was a) a legitimate bug, or b) my own forwards-incompatible stupidity.

1 Like

That looks like it is an accident. Using 0 instead of an index from the position seems to fix it. See this patch.