Skip to content

Lexical uploads drawer wrong depth when multiple documents deep #14426

@swheeler7

Description

@swheeler7

Describe the Bug

When using the drag and drop functionality to upload an image to a lexical field, the upload drawer appears at the wrong depth when editing a document more than one level deep.

Screen.Recording.2025-10-30.at.4.40.06.PM.mov

Link to the code that reproduces this issue

https://github.com/swheeler7/payload/tree/repro-upload-issue

Reproduction Steps

  1. pnpm run lexical
  2. Open the "repro" collection
  3. create a new relationship (to the level1 collection)
  4. In the drawer for this new relationship, create another new relationship (to the lexical fully featured collection)
  5. In the drawer for this new relationship, try to upload an image by dragging it into the editor

Which area(s) are affected? (Select all that apply)

plugin: richtext-lexical

Environment Info

Binaries:
  Node: 23.11.0
  npm: 10.9.2
  Yarn: N/A
  pnpm: 9.7.1
Relevant Packages:
  payload: 3.58.0
  @payloadcms/payload-cloud: 3.58.0
Operating System:
  Platform: darwin
  Arch: arm64
  Version: Darwin Kernel Version 24.6.0: Mon Jul 14 11:30:40 PDT 2025; root:xnu-11417.140.69~1/RELEASE_ARM64_T6041
  Available memory (MB): 49152
  Available CPU cores: 14

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions