Help! Selection broken across paragraphs on package update

After upgrading our Prosemirror packages we are experiencing very strange text selection behavior. Has anyone seen this issue before? Any pointers help would be really appreciated.

I’m still trying to figure out which package has caused the behavior.

Before the update:

Selection working as expected (See below)

After the update:

The selection shows correctly for a few milliseconds then snaps or disappears altogeather (See below)

It’s a major update. I know this is not ideal.


    "prosemirror-collab": "^1.0.0",
    "prosemirror-history": "^1.0.3",
    "prosemirror-keymap": "^1.0.0",
    "prosemirror-model": "^1.0.1",
    "prosemirror-state": "^1.0.1",
    "prosemirror-test-builder": "^1.0.1",
    "prosemirror-transform": "^1.0.1",
    "prosemirror-view": "^1.2.0",


    "prosemirror-collab": "^1.2.2",
    "prosemirror-history": "^1.1.3",
    "prosemirror-keymap": "^1.1.4",
    "prosemirror-model": "^1.13.1",
    "prosemirror-state": "^1.3.4",
    "prosemirror-test-builder": "^1.0.3",
    "prosemirror-transform": "^1.2.9",
    "prosemirror-view": "^1.17.3",

I can’t reproduce this on the website, so the first step would be to figure out which part of your integration is causing this (possibly by turning stuff off until it goes away).

So I have narrowed it down to this incremental package update.

"prosemirror-view": "^1.2.0". ---> "prosemirror-view": "^1.3.0",

I have disabled all plugins and nodeViews… It’s just the raw rendered document.

Odd. Does this issue occur for you on ? Me not being able to reproduce it might be browser related.

Thanks for responding on this. I really appreciate it. I can repro it in both Safari and Chrome.

I have created a pen for the repro case here: ProseMirror Selection Issue - CodeSandbox

Throws Error - Cannot read property '$anchor' of undefined

If you change the Prosemirror package versions on the left you will see it work as expected…

Thanks for any help. Finding this one difficult to solve. Prosemirror is really powerful. Hats off to you!

In our application the speaker and verify nodes are nodeViews

The root of the problem appears to be that you’re setting atom: true on nodes that aren’t actually atoms. (atom, in this case, means that there’s no content that’s managed by the editor rendered inside the node).

Aha! Let me try that. I read the atom setting as cascading… (overridable in child nodes)

I wonder if new Schema() could log a warning here… Warning: You have nested atom settings etc...

Thank you for your help @marijn. That seems to have solved it.

You have just saved me hours :raised_hands: