-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Comments
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? |
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. |
I'm still seeing this but this issue has been marked as fixed. |
@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. |
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)
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
The text was updated successfully, but these errors were encountered: