Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chrome: Editor has changes after Save Draft finishes #3296

Closed
aduth opened this issue Nov 1, 2017 · 4 comments · Fixed by #3298
Closed

Chrome: Editor has changes after Save Draft finishes #3296

aduth opened this issue Nov 1, 2017 · 4 comments · Fixed by #3298
Assignees
Labels
General Interface Parts of the UI which don't fall neatly under other labels. [Type] Bug An existing feature does not function as intended

Comments

@aduth
Copy link
Member

aduth commented 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)

  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

@aduth aduth added General Interface Parts of the UI which don't fall neatly under other labels. [Type] Bug An existing feature does not function as intended labels Nov 1, 2017
@aduth aduth self-assigned this Nov 1, 2017
@dartiss
Copy link

dartiss commented Nov 2, 2017

I'm intermittently seeing this on Safari too but can't recreate sufficiently well.

Even when I'm not experiencing this, after saving, the message always goes back to 'Save Draft', even when I can then navigate away fine and everything has saved. Is this correct?

@aduth
Copy link
Member Author

aduth commented Nov 2, 2017

Even when I'm not experiencing this, after saving, the message always goes back to 'Save Draft', even when I can then navigate away fine and everything has saved. Is this correct?

Not correct as in desired behavior, but this is what I would expect for you to experience with this bug being present, yes. It should also prompt you about unsaved changes, even when there are none.

@rishirdua
Copy link

I'm still seeing this but this issue has been marked as fixed.

@aduth
Copy link
Member Author

aduth commented Nov 2, 2018

@rishirdua More information is needed to debug. Can you leave a comment at #4687 which is an open variation of this issue, providing at least the active plugins on the site, whether it occurs consistently, and the type of content in the posts where the prompt is shown.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
General Interface Parts of the UI which don't fall neatly under other labels. [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants