Skip to content
This repository has been archived by the owner. It is now read-only.

Broken user separation for undo/redo #89

Open
stippi opened this issue Nov 26, 2021 · 2 comments
Open

Broken user separation for undo/redo #89

stippi opened this issue Nov 26, 2021 · 2 comments

Comments

@stippi
Copy link

stippi commented Nov 26, 2021

Steps to reproduce in the demo:

  • Insert text into the editor of the first user
  • Insert text into the editor of another user
  • Switch focus back to the editor of the first user
  • Invoke "undo", for example via keyboard shortcut

Observed behavior:
The text inserted by the second user is removed, but from within the editor of the first user.

Expected behavior:
Only the text inserted by the first user should be removed. The text inserted later by the second user should be left intact.


From my understanding, the editor is constructed with withHistory(). It is notable that Y.js itself also provides a solution for a user-separated undo history.

@BitPhinix
Copy link
Owner

The current version of slate-yjs doesn't offer a history plugin so this is to be expected. The new version (in the next branch) however will.

@stippi
Copy link
Author

stippi commented Nov 26, 2021

Nice. Thanks for the update!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants