Page MenuHomePhabricator

VisualEditor: 'generated' property should not be preserved when unwrapping
Closed, ResolvedPublic

Description

When we unwrap lists, we currently preserve the internal 'generated' property on paragraphs inside those lists, but we really shouldn't. The fact that we don't currently clear this when unwrapping results in the following serious bug:

  1. Create a page with the following content

Foo
Bar

  • Baz
  • Quux
  • Whee

Yay

  1. Open the page in VE
  2. Select across the three list items and click the list button to unlist them
  3. VE now shows five paragraphs
  4. Click "Review and save" and observe the diff.

Expected diff: the asterisk and space before "Baz", "Quux" and "Whee" are removed.

Actual diff: the second line becomes "BarBazQuuxWhee", followed by three blank lines, then "Yay".

This happens because the converter unwraps paragraphs with the 'internal': { 'generated': 'wrapper' } property, even if these paragraphs now appear in a different context and even if there are multiple such paragraphs adjacent to each other.


Version: unspecified
Severity: normal

Details

Reference
bz45590