Preview button in edit lock modal is saving the post #27568
Labels
[Feature] Saving
Related to saving functionality
[Status] In Progress
Tracking issues with work in progress
[Type] Bug
An existing feature does not function as intended
Describe the bug
If User A is editing a draft post and User B clicks to edit it, they get a modal that the post is being edited, with options to Exit, Preview, or Take Over. (note that Preview is currently hidden on desktop view, but visible in mobile view).
If User B clicks the Preview button, it saves the post and then loads the preview. If metaboxes are present, it actually overrides the edit lock and kicks out User A.
To reproduce
Steps to reproduce the behavior:
Expected behavior
When the second user clicks the Preview button, there should not be a save. It should go to the preview url.
Screenshots
If applicable, add screenshots to help explain your problem.
Editor version (please complete the following information):
Desktop (please complete the following information):
Additional context
The problem appears to be happening here:
gutenberg/packages/editor/src/components/post-preview-button/index.js
Lines 162 to 175 in 5cd71f4
The
isAutosaveable
prop does not appear to be checking the edit lock.This code snippet will add a metabox and show the Preview button:
The text was updated successfully, but these errors were encountered: