Description
Describe the Bug
When opening a document through a drawer (such as from a join field relationship) where the target collection has autosave enabled, any save operation immediately closes the drawer. This occurs even when the document status is draft and happens on every draft update triggered by the autosave functionality.
The issue affects:
- Join field drawers opening autosave-enabled collections
- Custom drawers opening autosave-enabled collections
- Any drawer context where autosave collections are edited
The drawer closes unexpectedly on each autosave interval, making it impossible to edit documents in drawer contexts when autosave is enabled.
Link to the code that reproduces this issue
https://github.com/cgilly2fast/payload-issue-auto-drawer
Reproduction Steps
- Seed the database with the website template data.
- Go to post and your user as an author
- Go to the user profile page
- Open the post in the join field added to the user collection
- Any autosave will close the drawer
Which area(s) are affected? (Select all that apply)
Not sure, area: core
Environment Info
Payload 3.44