Description
openedon Nov 1, 2017
Suspected regression of #3178
Issue Overview
When saving a draft for a post containing block content, the post is flagged as needing to be saved even after save completes.
Steps to Reproduce (for bugs)
- Navigate to Posts > Add New
- Click writing prompt to add a new paragraph block
- Click Save Draft
Expected Behavior
After save completes, "Saving..." label replaced with "Saved"
Current Behavior
After save completes, "Saving..." label replaced with "Save Draft" button. Attempting to navigate away prompts the user to save their changes.
Possible Solution
The isEditedPostDirty
selector compares present blocks in state against the original history of the post. Prior to #3178 the history would be reset at each save, meaning that present blocks would match and the post flagged as "clean" after a save completes. With #3178 removing this reset, we need to update the selector or state to reflect an original state of editor blocks from the latest save.
Related Issues and/or PRs
Related: #3178