-
-
Notifications
You must be signed in to change notification settings - Fork 52
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
Random bug when undoing #242
Comments
Hello I am having this same issue as well. It makes the plugin effectively unusable in practice. Would really appreciate if someone can work on this one. Thank you!! |
Hello @Jean-PhilippeD, thanks for reporting the issue, we were checking and now with version |
Hello @juliandsg0222 . editorJS.current = new EditorJS({
holder: "something",
data: defaultBlock,
...
onReady() {
if (!!editorJS.current) {
new Undo({
editor: editorJS.current,
maxLength: 20,
config: {
debounceTimer: 100,
shortcuts: {
undo: 'CMD+Z',
redo: 'CMD+SHIFT+Z',
},
},
});
...
}
},
〜〜
<div id="something"/> **If Undo is performed immediately after the block data is mounted with the default value (defaultBlock), all block data will be lost. It seems to me that this could be avoided by determining if this is not the initial state before attempting to perform Undo, can this be fixed?** |
Hello @n2-freevas, thanks for the report, could you tell us which versions of |
Hi @juliandsg0222 I continue to have the same issue on 2.0.27. Here is a loom video where I walk through the issue. |
@juliandsg0222 |
Hello everyone 👋 @n2-freevas, @ARH3, @Jean-PhilippeD, We are currently working to fix these issues, at the moment to fix the problem of @ARH3 you can try preserving blank space in a paragraph, this problem had arisen a long time ago, you can check the discussion here codex-team/editor.js#1868 (comment) |
Precheck
Description
I use undo (and dragDrop which doesn't work by the way) and when I want to rollback some text with ctrl+Z sometimes it's working fine, sometimes it does erase whole blocks, append new empty block at the beginning, duplicates some other blocks...
I have no idea what's happening...
Environment
Current behavior
Here is the behavior :
I initialize editorJs like this :
Expected behavior
Undo to works fine :)
The text was updated successfully, but these errors were encountered: