WHAT IS THE BUG
When writing text in any object and triggering the “lock page” information might be lost. You might write down or change a word, then lock the page using the keyboard shortcut. The page renders and you realize your changes was lost. Now there are two possible scenarios:
- You exit the object and open it again. Then everything works fine and your changes have been saved.
- Instead of exiting the object, you decide to unlock the page again. All changes that have been made (only weren’t visible) are now really gone because the editor restores the state of the locked object.
HOW TO REPRODUCE IT
- Write down some words.
- Lock the page using the keyboard shortcut.
- Realize that data was lost.
- I was able to provide you a video capture of the bug, here it is:
THE EXPECTED BEHAVIOR
I would expect that all edits are saved
SYSTEM INFORMATION
-
OS:
MacOS Ventura 13.2 -
Device:
MacBook Pro M1 -
Anytype Version:
Version: 0.30.0
ADDITIONAL CONTEXT
There are several ways to trigger this. Hitting enter seems to fix this problem, since a new block is created. Deletion as well as edits of words are lost. I don’t know what happens to the data under the hood but i do know that locking too quickly causes loss of data. I think it takes some time for the editor to save the data. But there is no mechanism to prevent actions that are faster than the process of saving.
In the recording you can clearly see that the moment I lock the page, things behave weird. The only time changes were saved after hitting enter and then locking the page. I do unlock the page afterwards on purpose. As described before, exiting and reopening the object each time after locking it would solve the problem. But it should of course also work without that workaround.