If you select a paragraph to delete and then cancel the action in the confirmation, the text is not restored in the edit form.

Images of before and after the cancel are attached.

How to reproduce:

  • Create a simplytest.me project using paragraphs_features.
  • Add a paragraph type of Text with just a long formatted text field.
  • Add a paragraph entity reference field to the basic content type.
  • Set up the display widget to use modal and delete confirmation.
  • Create a basic page with a couple of text paragraphs and save it.
  • Edit the page and remove one of the paragraphs
  • Select Cancel in the confirmation

The text paragraph comes back but the edit form is empty. Refreshing the page will bring it back.

Also, if you save the page after a cancel action blanks the text, you do not lose the text. So just a UI issue and not a data loss problem.

CommentFileSizeAuthor
pf-post-cancel-remove.png14.25 KBcgmonroe
pf-pre-remove.png18.64 KBcgmonroe

Comments

cgmonroe created an issue. See original summary.

mtodor’s picture

Assigned: Unassigned » mtodor
Issue summary: View changes

I can confirm this. Looks like CKEditor is broken after "Cancel" action.

=> Other way to reset data is -> collapse -> expand broken paragraph.

mtodor’s picture

Status: Active » Needs review

@cgmonroe for some reason CKEditor goes in bad stated after hiding it.

This should fix the problem: https://github.com/thunder/paragraphs_features/pull/21 - it would be good if you can test it. To get patch file from PR on github, justs add .diff to link: https://patch-diff.githubusercontent.com/raw/thunder/paragraphs_features...

We still need tests that will cover this problem.

mtodor’s picture

PR - is ready for review.

  • mtodor authored 1b5db9e on 8.x-1.x
    Issue #2989195 by cgmonroe, mtodor: Canceling a Remove action clears...
mtodor’s picture

Status: Needs review » Fixed

The issue should be fixed with version 1.4.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.