Skip to content

Chrome: Editor has changes after Save Draft finishes #3296

Closed

Description

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)

  1. Navigate to Posts > Add New
  2. Click writing prompt to add a new paragraph block
  3. 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

Labels

General InterfaceParts of the UI which don't fall neatly under other labels.[Type] BugAn existing feature does not function as intended

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions