Skip to content

Stack of dialogs is closed on autosave #16098

@mrvecka

Description

@mrvecka

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 #12975

Screen.Recording.2026-03-30.at.11.51.05.mov

Link to the code that reproduces this issue

https://github.com/mrvecka/payload-test/tree/bug-report/double-drawer-close-them-all

Reproduction Steps

  1. create or edit posts
  2. add new category
  3. in opened drawer click "Create new"
  4. 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Bugarea: uiRelated to the admin panel.status: needs-triagePossible bug which hasn't been reproduced yet

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions