awcodes / filament-tiptap-editor

A Rich Text Editor plugin for Filament Forms.
MIT License
272 stars 73 forks source link

Weird behavior when sorting in repeater #190

Closed jyrkidn closed 9 months ago

jyrkidn commented 11 months ago

Filament Version

v3.0.79

Plugin Version

v3.0.2

PHP Version

PHP 8.2.6

Problem description

When you add the Tiptap Editor to a sortable repeater, the prosemirror div gets duplicated. After saving it's correct again, so I don't know yet if this is an issue caused by this package or in tiptap itself.

Expected behavior

To keep the original content

Steps to reproduce

Forms\Components\Repeater::make('items')
    ->schema([
        TiptapEditor::make('text'),
    ]),

Reproduction repository

https://github.com/jyrkidn/filament-tiptap-test

Relevant log output

See the video I made: https://github.com/jyrkidn/filament-tiptap-test/blob/master/Screen%20Recording%202023-10-18%20at%2015.33.08.mov
jyrkidn commented 11 months ago

I'll check this later as well, to see if I can find something related to this in the package.

awcodes commented 11 months ago

Thanks. I'll look into as soon as I get a chance. I do know though that there are some similar issues reported with Filament's own Rich/Markdown editors in repeaters. So, it could even be a Livewire issue.

RobertsG commented 10 months ago

Encountering the same exact issue while using in builder. But its linked to reordering.

awcodes commented 10 months ago

I'm thinking this is something in Livewire or Filament.

https://github.com/filamentphp/filament/issues/7829

RobertsG commented 9 months ago

Any news on this, at the moment its quite an annoying bug that causes lost time when users enter content after a reordering the editor and the content gets thrown out on save as it was not updated in the correct duplicated text.