CRUD icon indicating copy to clipboard operation
CRUD copied to clipboard

[Bug] TinyMCE Editor Becomes Unresponsive After Moving Items in Repeatable Field

Open h-koba opened this issue 2 years ago • 4 comments

Bug report

What I did

I am utilizing the TinyMCE editor within a repeatable field in Laravel Backpack. When I tried to change the order of items within the repeatable field by moving an item, the TinyMCE editor within the moved field became unresponsive.

What I expected to happen

I expected the TinyMCE editor to continue functioning normally, allowing text editing even after moving items within the repeatable field.

What happened

After moving an item within the repeatable field, the TinyMCE editor in the moved field became unresponsive and I was unable to edit text within it.

Is it a bug in the latest version of Backpack?

After I run composer update backpack/pro the bug... is it still there?

Yes, the bug is still present after updating.

Backpack, Laravel, PHP, DB version

When I run php artisan backpack:version the output is:

  • Laravel Version: 10.29.0
  • Backpack Version: backpack/crud: 6.2.4, backpack/pro: 2.0.18
  • PHP Version: 8.1
  • Database Type & Version: MySQL 8.0.30

h-koba avatar Nov 02 '23 05:11 h-koba

Hello there! Thanks for opening your first issue on this repo!

Just a heads-up: Here at Backpack we use Github Issues only for tracking bugs. Talk about new features is also acceptable. This helps a lot in keeping our focus on improving Backpack. If you issue is not a bug/feature, please help us out by closing the issue yourself and posting in the appropriate medium (see below). If you're not sure where it fits, it's ok, a community member will probably reply to help you with that.

Backpack communication channels:

  • Bug Reports, Feature Requests - Github Issues (here);
  • Quick help (How do I do X) - Gitter Chatroom;
  • Long questions (I have done X and Y and it won't do Z wtf) - Stackoverflow, using the backpack-for-laravel tag;
  • Showing off something you've made, asking for opinion on Backpack/Laravel matters - Reddit;

Please keep in mind Backpack offers no official / paid support. Whatever help you receive here, on Gitter, Slack or Stackoverflow is thanks to our awesome awesome community members, who give up some of their time to help their peers. If you want to join our community, just start pitching in. We take pride in being a welcoming bunch.

Thank you!

-- Justin Case The Backpack Robot

welcome[bot] avatar Nov 02 '23 05:11 welcome[bot]

I noticed the same problem on my side using TinyMCE in repeatable fields and changing the order.

I think that the instance of the TinyMCE object is based on a reference to the DOM which is lost following the change of order in the repeatable. I didn't really investigate the problem because I quickly changed editors to summernote.

dimer47 avatar Nov 02 '23 08:11 dimer47

Hey @h-koba,

Thanks for reporting the issue. I can confirm that it's reproducible and thus we will add this to our backlog to be worked on in an upcoming release.

If you are able to come up with a PR, we'd be happy to review & merge, too.

Cheers

phpfour avatar Nov 06 '23 05:11 phpfour

Thank you, @phpfour. I'm looking forward to the fix in the upcoming release!

h-koba avatar Nov 06 '23 06:11 h-koba