yjs / y-prosemirror

ProseMirror editor binding for Yjs

Home Page:https://demos.yjs.dev/prosemirror/prosemirror.html

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Cursor not in right position when in empty line in a code block.

Saul-Mirone opened this issue · 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
Now I have client A and client B.

  1. When I move both client A's cursor in a newline in a codeblock.
  2. Now I cannot move client B's cursor at that new line.
  3. Then I switch back to client A, I find the position of the cursor is not right and I cannot move it to that new line.

To Reproduce
Steps to reproduce the behavior:

  1. Go to https://github.com/Saul-Mirone/prosemirror-yjs-bug-reproduce
  2. Clone the repo
  3. Run pnpm install && pnpm dev
  4. See error

Expected behavior
Cursor at right position.

Screenshots
If applicable, add screenshots to help explain your problem.

Screen.Recording.2022-06-01.at.23.04.50.mov

Environment Information

  • Chrome 102
  • Latest Yjs