yjs/y-prosemirror

node duplicate on page reload when enforcing a custom node as first block in collaborative setup

LeongLRF opened this issue · 0 comments

Please save me some time and use the following template. In 90% of all issues I can't reproduce the problem because I don't know what exactly you are doing, in which environment, or which y-* version is responsible. Just use the following template even if you think the problem is obvious.

Checklist

Describe the bug
A clear and concise description of what the bug is.

To Reproduce
Steps to reproduce the behavior:

  1. Enforce a custom node as the first block
export const Doc = Document.extend({
    content: 'title block*',
    addAttributes() {
        return {
            creator: {
                default: null
            }
        }
    }
})
  1. setup the collaboration
  2. editor a page in two browser
  3. reload the page

Expected behavior
the custom node should not duplicate

Screenshots
first load:
image
reload:
image

Environment Information

  • Browser / Node.js [e.g. Chrome, Firefox, Node.js]
  • Yjs version and the versions of the y-* modules you are using [e.g. yjs v13.0.1, y-webrtc v1.2.1]. Use npm ls yjs to find out the exact version you are using.

Additional context
Add any other context about the problem here.

  • I'm a sponsor 💖
  • This issue is a blocker for my project.