Skip to content

Conversation

furkan3ayraktar
Copy link

If two editors are open for the same Y.Doc, the cursor awareness state enters into an infinite update loop. This commit fixes the issue by using the solution suggested in this issue.

We've been using this solution for the last one and half years in production without any issues. I remembered it when receiving a recent notification from the issue and wanted to share the solution as a PR.

If two editors are open for the same Y.Doc, the cursor awareness state enters into an infinite update loop. This commit fixes the issue.
@szymonkozak
Copy link

I have tested this solution and though it fixes the main problem I have noticed that after switching a tab (focusout event), the cursor of the user (which switches the tab) is blinking for a moment. When we don't register focusout listener then this problem is solved but I don't know if it introduces other issues or not.

@garth
Copy link

garth commented Jan 10, 2024

I used pnpm patch to apply this PR and it fixed infinite loops when using awareness with tiptap with y-websocket-server, but the infinite loop still happens with hocuspocus.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants