payloadcms / payloadcms/payload

Lexical editor is readonly when using drag and drop for relation upload field

Open
#13,178 0 comments 0 reactions 1 assignee View on GitHub

@AlessioGr is already working on this.

Since Nov 6, 2025.

plugin: richtext-lexical stale
Dominant language
TypeScript
Stars
44.8k
Forks
4.2k
Avg merge
2d 21h
Merged PRs (30d)
53

Description

Describe the Bug

When using a type: 'upload' field with a relation to another collection (e.g. relationTo: 'media'), the drag and drop functionality makes the lexical rich text editor to be readonly in the editing drawer.

Image

This is not an issue if clicking "Create New" in the Cover Image field and/or creating a Media manually and then selecting an existing one. From my testing, this only applies to drag and dropping the image in a relational field.

Seems to be related to some older issues like #9363 and #8691. Haven't been able to find a workaround for it yet though.

Link to the code that reproduces this issue

https://github.com/szeckirjr/testing-payload2

Reproduction Steps
  1. Clone the repo
  2. cd testing-payload2
  3. Copy .env.local into .env
  4. pnpm install
  5. pnpm dev
  6. Open http://localhost:3000/admin
  7. Login with test@example.com and 123456789
  8. Click on Projects collection and create a new project
  9. In the “Cover Image” section, drag and drop an image into the field
  10. Notice the Caption Lexical Editor field is readonly and uneditable
Which area(s) are affected? (Select all that apply)

area: ui
plugin: richtext-lexical

Environment Info
Binaries:
  Node: 22.15.0
  npm: 10.9.2
  Yarn: 1.22.22
  pnpm: 10.7.1
Relevant Packages:
  payload: 3.47.0
  next: 15.3.2
  @payloadcms/email-nodemailer: 3.47.0
  @payloadcms/graphql: 3.47.0
  @payloadcms/next/utilities: 3.47.0
  @payloadcms/payload-cloud: 3.47.0
  @payloadcms/richtext-lexical: 3.47.0
  @payloadcms/translations: 3.47.0
  @payloadcms/ui/shared: 3.47.0
  react: 19.1.0
  react-dom: 19.1.0
Operating System:
  Platform: darwin
  Arch: arm64
  Version: Darwin Kernel Version 24.0.0: Tue Sep 24 23:37:25 PDT 2024; root:xnu-11215.1.12~1/RELEASE_ARM64_T6030
  Available memory (MB): 18432
  Available CPU cores: 12

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.