payloadcms / payloadcms/payload
Lexical editor is readonly when using drag and drop for relation upload field
@AlessioGr is already working on this.
Since Nov 6, 2025.
- 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.
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
- Clone the repo
cd testing-payload2- Copy
.env.localinto.env pnpm installpnpm dev- Open http://localhost:3000/admin
- Login with
test@example.comand123456789 - Click on
Projectscollection and create a new project - In the “Cover Image” section, drag and drop an image into the field
- 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
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.
Assessment
This issue has not been assessed yet.