Opening relationship field with `appearance: "drawer"` inside rich text inline block
Closed this issue · 2 comments
ruslan-amboss commented
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`
github-actions commented
🚀 This is included in version v3.57.0
github-actions commented
This issue has been automatically locked.
Please open a new issue if this issue persists with any additional detail.