When I open a post in the gutenberg editor and I close it I expect the post won't contain any local changes.
When I open a post in the gutenebrg editor and I close it the post contains local changes.
Emulator API 29
cc @mchowning you recently played with saving/exiting editor
cc @planarvoid you also have context. Would you have time to look into it during groundskeeping?
Looks related to the ticket opened a few days ago in the gb-mobile repo: https://github.com/wordpress-mobile/gutenberg-mobile/issues/2714
Thanks for the info, I've missed that. They look similar, however, I haven't even need to scroll + this issue isn't about autosave but about save on exit. Having said all that there is a pretty high chance these two tickets are related.
Since you're also @mchowning doing groundskeeping this week, is it ok if I'll leave this to you?
@mkevins has noted a similar-sounding issue here:
Another observation [...] is that simply opening and existing the post (without making any changes) and then closing it results in the autosave mechanism kicking in.
I have spent some time investigating this, and it appears to be due to certain blocks having outdated or otherwise unexpected (but valid) formatting in the post content. I (obviously) still need to do some more investigation into this, and I do plan to follow-up on this.
I suspect this may be related to https://github.com/wordpress-mobile/gutenberg-mobile/issues/894.
A note which might be useful - I noticed the EditorFragment.getTitleOrContentChanged() is invoked when you open a post. It's also interesting that it is invoked on the same post every time you open it (even if you open it after it already has the "local changes" label).
Removed my assignment because I'm not going to have time to get back to this in the near future.
Raising priority because there is potential data loss if Gutenberg Mobile doesn't return the most up to date content when the EditPostActivity asks for it (noted at https://github.com/wordpress-mobile/WordPress-Android/issues/13003#issuecomment-750106983).
Apologies, I added that last comment to the wrong issue. @malinajirka can you help me with prioritization on this one? Should it stay medium?