-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Open
Description
Describe the Bug
The issue with the relationship field using appearance: "drawer"
inside a rich text inline block has resurfaced.
For context:
The original issue was fixed by temporarily introducing a timeout in #12529.
Later, the timeout was increased in #13031 to 100ms, which worked for a while.
We’re now seeing the same issue again, both reproducible in our codebase and in the Payload codebase.
I’ve attached a video demonstrating the problem, and here is the reproduction code.
Link to the code that reproduces this issue
Reproduction Steps
issue_is_back.mov
import type { CollectionConfig } from 'payload'
import { BlocksFeature, lexicalEditor } from '@payloadcms/richtext-lexical'
export const postsSlug = 'posts'
export const PostsCollection: CollectionConfig = {
slug: postsSlug,
admin: {
useAsTitle: 'title',
},
fields: [
{
name: 'title',
type: 'text',
},
{
name: 'content',
type: 'richText',
editor: lexicalEditor({
features: ({ defaultFeatures }) => [
...defaultFeatures,
BlocksFeature({
inlineBlocks: [
{
slug: 'inline-media',
fields: [
{
name: 'media',
type: 'relationship',
relationTo: ['media'],
admin: {
appearance: 'drawer',
},
},
],
},
],
}),
],
}),
},
{
name: 'media',
type: 'relationship',
relationTo: ['media'],
admin: {
appearance: 'drawer',
},
},
],
}
Which area(s) are affected? (Select all that apply)
area: ui
Environment Info
Payload version `3.55.1`