BitPhinix / slate-yjs

Yjs binding for Slate
https://docs.slate-yjs.dev
MIT License
514 stars 73 forks source link

fix cursors overlay crash #412

Closed ilya2204 closed 1 year ago

ilya2204 commented 1 year ago

Hello @BitPhinix I made a temporary solution that seems to fix cursor crashes and they work as they should. It is clear that this is not a targeted solution, but at the moment I think it's better than not being able to use them at all in react 18. #372

changeset-bot[bot] commented 1 year ago

🦋 Changeset detected

Latest commit: 8fde32a700efde1f65a09beaf9eb2aaf85a4fc08

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages | Name | Type | | ------------------ | ----- | | @slate-yjs/react | Minor | | @slate-yjs/example | Patch |

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

BitPhinix commented 1 year ago

Open to merging this as a temporary fix! I would love for someone to dig into this further and fix a proper fix

ilya2204 commented 1 year ago

@BitPhinix I added changeset. And I also had to add "try catch" in one more place, the original fix fixed repository example, but in my project with a more complex editor structure, cursors could still be broken