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
- Are you reporting a bug? Use github issues for bug reports and feature requests. For general questions, please use https://discuss.yjs.dev/
- Try to report your issue in the correct repository. Yjs consists of many modules. When in doubt, report it to https://github.com/yjs/yjs/issues/
Describe the bug
Now I have client A and client B.
- When I move both client A's cursor in a newline in a codeblock.
- Now I cannot move client B's cursor at that new line.
- 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:
- Go to https://github.com/Saul-Mirone/prosemirror-yjs-bug-reproduce
- Clone the repo
- Run
pnpm install && pnpm dev
- 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