Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Undo/Redo Stack shared between multiple editor instances #554

Open
2 tasks done
Sin-Yone opened this issue Jul 24, 2024 · 1 comment
Open
2 tasks done

[BUG] Undo/Redo Stack shared between multiple editor instances #554

Sin-Yone opened this issue Jul 24, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@Sin-Yone
Copy link

If you want to ask for support or request features, sponsor the project and contact me over email.

  • I have searched for similar issues in both open and closed tickets and cannot find a duplicate.
  • I have read the documentation and cannot find an answer.

Describe the bug
If two or more instances of the editor are used and content has been created in them, when undo/redo is called in one editor, undo/redo is also performed in the other editors when all changes have been completed in the current editor.

Reproduction
https://codesandbox.io/p/sandbox/mdx-editor-base-forked-r7vynx

To Reproduce
Steps to reproduce the behavior:

  1. Create two or more editor instances
  2. Create content in each of them
  3. Undo/redo all changes in one of them and keep doing undo/redo (either with shortcut or with the button in the toolbar)
  4. See undo/redo applied to the other editor as well

Expected behavior
Undo/redo only applies to the content of the editor, where it was called.

Video

2024-07-24.23-32-15.mp4

Desktop

  • OS: Windows
  • Browser: Chrome
  • Stack: Next.js App-Router

Additional context
I went back to version 2.0 and the error still occurred. Only when I switched to version 1.* did undo/redo only apply to the content of the editor to which it belongs.

@Sin-Yone Sin-Yone added the bug Something isn't working label Jul 24, 2024
@sablikj
Copy link

sablikj commented Oct 2, 2024

Same problem here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants