Skip to content

Post Title in preview is wrong: using the last autosave rather what is in the editor #33758

@cpapazoglou

Description

@cpapazoglou

Description

Content doesn't update when previewing a draft when that draft was previously public.

Step-by-step reproduction instructions

  1. Open the edit page for a brand new post
  2. Add "Title" as title and hit "Publish"
  3. Hit preview in a new tab
  4. Notice the preview works great
  5. Update the title to "Autosaved Title" and preview
  6. Notice preview still works great
  7. Reload the page (without explicitly saving)
  8. Notice the title is correctly "Title"
  9. Hit preview in a new tab
  10. Notice the title is incorrectly "Autosaved Title"

Expected behaviour

The Title in the preview to be the current title in the editor

Actual behaviour

The Title in the preview is wrong, an older autosaved title

SS.2021-07-29.at.16.35.09.mp4

WordPress information

  • WordPress version: 5.8
  • Gutenberg version: Whatever ships with WP 5.8
  • Are all plugins except Gutenberg deactivated? Yes
  • Are you using a default theme (e.g. Twenty Twenty-One)? Yes

Device information

  • Device: Desktop
  • Operating system: macOs 11.4
  • Browser: Chrome 91.0.4472.164

Metadata

Metadata

Assignees

Labels

[Package] Editor/packages/editor[Status] In ProgressTracking issues with work in progress[Type] BugAn existing feature does not function as intended

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions