Problem/Motivation

If you use the "collapse all" function on Paragraphs, and toggle all the paragraphs while editing a node, then you get the "changed" icon on paragraphs even when you made no change.

This is really an issue with ckeditor, but is also tracked on the Paragraphs issue queue: https://www.drupal.org/project/paragraphs/issues/2893470

Steps to reproduce

  1. Install, enable, & configure the Paragraphs module & ckeditor
  2. In particular: set the Paragraphs config to allow the "collapse all" button
  3. Create a node with many paragraphs & save it
  4. Edit the node again (so you don't have to worry about pre-save entities)
  5. Click the "Edit All" button to expand all paragraphs
  6. Click the "Collapse All" button to collapse them again
  7. Notice that some paragraphs have the "changed" icon now, even though you didn't change anything.

Proposed resolution

See patch

Remaining tasks

Test patch

User interface changes

The erroneous icon disappears. No other UI changes.

Introduced terminology

N/A

API changes

Change to editor.model.document.on(), to detect "isUndoable" and exit early.

Data model changes

N/A

Release notes snippet

Fix phantom "changed" icons on Paragraphs "collapse all" with ckeditor 5.

Issue fork drupal-3626876

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

koppie created an issue. See original summary.

cilefen’s picture

Component: ckeditor.module » ckeditor5.module
Status: Active » Needs review
smustgrave’s picture

Status: Needs review » Needs work

Sorry but "See patch" isn't a proper issue summary.

And if we are going to add to core should we have test coverage for this issue.