payload icon indicating copy to clipboard operation
payload copied to clipboard

Inline block drawer doesn’t open when inserting a inline block

Open ChannKan opened this issue 1 year ago • 4 comments

Describe the Bug

When inserting a inline-block into a rich-text field it is added immediately without opening the drawer first

Link to the code that reproduces this issue

https://github.com/shefing/payload_Inline_block_with_relationship/tree/Check_inline_block

Reproduction Steps

Steps to reproduce:

  1. Clone the link to reproduction ripo and launch Payload
  2. Create a new Post instance
  3. Add a inline-block to the rich-text field

Expected: Inline-block drawer is opened

Actual: Inline-block drawer doesn’t open and a empty inline-block is added in the rich-text field

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

plugin: richtext-lexical

Environment Info

Payload: 3.1.0
Node.js: 22.11.0
Next.js: 15.0.3

ChannKan avatar Nov 26 '24 12:11 ChannKan

Additional related bug: When there are two types of inline-blocks in the rich-text field, the drawer that opens for both of them (when clicking on the edit icon) is the one that was added last .

Steps to reproduce:

  1. Clone the link to reproduction ripo and launch Payload (another commit was added for this part)
  2. Create a new Post instance
  3. Add inline-block 'MyInlineBlock' to the rich-text field
  4. Add inline-block 'MyInlineBlock2' to the rich-text field
  5. Click on the 'MyInlineBlock' edit icon

Expected: Inline-block drawer for 'MyInlineBlock' is opened

Actual: Inline-block drawer for 'MyInlineBlock2' is opened

ChannKan avatar Nov 27 '24 12:11 ChannKan

In addition, when editing an inline block in the drawer, it appears to open drawers for all the instances of the specific inline block, that exist in the current lexical richtext editor. For example, when adding two inline blocks of the same type and then opening a drawer, both of the drawers actually appear on top of each other.

Spreizu avatar Nov 29 '24 11:11 Spreizu

This issue has been automatically locked. Please open a new issue if this issue persists with any additional detail.

github-actions[bot] avatar Dec 01 '24 04:12 github-actions[bot]

🚀 This is included in version v3.3.0

github-actions[bot] avatar Dec 03 '24 18:12 github-actions[bot]

https://github.com/payloadcms/payload/issues/9816

AlessioGr avatar Dec 19 '24 18:12 AlessioGr