awcodes / filament-tiptap-editor

A Rich Text Editor plugin for Filament Forms.
MIT License
278 stars 77 forks source link

Wrong block is edited when using multiple blocks of same type #392

Closed freshleafmedia closed 3 months ago

freshleafmedia commented 4 months ago

Filament Version

v3.2.85

Plugin Version

v3.3.5

PHP Version

8.3.6

Problem description

Add multiple of the same type of block to an editor and then editing one of them will cause the wrong block to be updated

Expected behavior

Edits to a block are on the correct block

Steps to reproduce

https://github.com/awcodes/filament-tiptap-editor/assets/10062339/7fc7b420-55cb-4f13-9133-9a69bfb7806e

Reproduction repository

https://github.com/freshleafmedia/tiptap-repro/tree/alt

Relevant log output

No response

awcodes commented 4 months ago

Interesting, this appears to only happen if a block is the first item in the content. I've replicated locally, will see what I can figure out.

Thanks.