payloadcms / payloadcms/payload
Stack of dialogs is closed on autosave
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 44.8k
- Forks
- 4.2k
- Avg merge
- 2d 21h
- Merged PRs (30d)
- 53
Description
Describe the Bug
When relationship field has similar configuration
{
name: 'category',
type: 'relationship',
relationTo: 'categories',
admin: {
position: 'sidebar',
appearance: 'drawer', // important
},
}
And you try to create new category document, both drawers are closed.
First click will open drawer to select document. In that drawer click to create new document which opens new drawer. On save both drawers are closed. In case collection has versions enabled, the autosave action will close both dialogs. Check the recording.
More info:
Category collection is versioned.
The issue persist even if collection isn't versioned. Drawers are closed on save.
It might be related to older issue https://github.com/payloadcms/payload/issues/12975
https://github.com/user-attachments/assets/069abd89-439a-4a88-9d3d-c90f0d8aee1e
Link to the code that reproduces this issue
https://github.com/mrvecka/payload-test/tree/bug-report/double-drawer-close-them-all
Reproduction Steps
- create or edit posts
- add new category
- in opened drawer click "Create new"
- add category title
Check the recording.
Which area(s) are affected?
area: ui
Environment Info
Binaries:
Node: 24.13.1
npm: 11.8.0
Yarn: 1.22.22
pnpm: 10.5.2
Relevant Packages:
payload: 3.80.0
next: 15.4.10
@payloadcms/db-postgres: 3.80.0
@payloadcms/drizzle: 3.80.0
@payloadcms/graphql: 3.80.0
@payloadcms/live-preview: 3.80.0
@payloadcms/live-preview-react: 3.80.0
@payloadcms/next/utilities: 3.80.0
@payloadcms/plugin-form-builder: 3.80.0
@payloadcms/plugin-nested-docs: 3.80.0
@payloadcms/plugin-redirects: 3.80.0
@payloadcms/plugin-search: 3.80.0
@payloadcms/plugin-seo: 3.80.0
@payloadcms/richtext-lexical: 3.80.0
@payloadcms/translations: 3.80.0
@payloadcms/ui/shared: 3.80.0
react: 19.2.1
react-dom: 19.2.1
Operating System:
Platform: darwin
Arch: arm64
Version: Darwin Kernel Version 24.6.0: Wed Nov 5 21:33:32 PST 2025; root:xnu-11417.140.69.705.2~1/RELEASE_ARM64_T6030
Available memory (MB): 18432
Available CPU cores: 11
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the linked payload-test reproduction branch and follow the relationship-field drawer flow through creating and saving a category, including the autosave case. Confirm the fix by repeating the reported steps and verifying that both drawers remain open after the category is saved.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react, typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 52/100