Edits lost after accidental back and forward navigation #5972
Replies: 1 comment 1 reply
|
Your reading is right, and it is deliberate rather than a bug. I checked it on a throwaway 0.30.0 instance with a browser driving it, doing the same thing twice. Typing into the composer without saving, navigating away and coming back: the text is still there. Opening an existing memo with Edit, changing the text without saving, navigating away and coming back: the change is gone and the original content is back. The mechanism is const isDraftCacheEnabled = !memo;
const { discardDraft } = useAutoSave(currentUser?.name ?? "", cacheKey, isInitialized && isDraftCacheEnabled);The third argument is So the instant save page is accurate about what it covers, and the gap you hit is that it covers the composer only. If you want to raise it, the useful shape is probably not "autosave edits too" but "give edit mode its own draft key", because the caching layer already namespaces keys. |
Uh oh!
There was an error while loading. Please reload this page.
The website talks about instant saves https://usememos.com/features/instant-save but this only applies to new notes, not edits to existing ones?
All reactions