VisualEditor: Support editing <div>s with mw:ExpandedAttrs due to a template in their style
Open, NormalPublic

Description

Div tags like the ones seen in https://meta.wikimedia.org/wiki/Grants:IdeaLab cause "alienated content"/prevent people from editing the page. VisualEditor should support div tags.


Version: unspecified
Severity: normal

Details

Reference
bz63941
bzimport raised the priority of this task from to Low.
bzimport set Reference to bz63941.

<div> tags work just fine, and have for nearly a year. The problem here is a <div> tag with a template in its style attribute.

Unfortunately, it seems this has regressed from 'cannot edit' to 'can edit, but changes do not show up'. Could the priority be increased to reflect that?

TheDJ added a subscriber: TheDJ.Jun 23 2016, 9:02 AM

Confirmed, this now silently fails to save your edits, which is VERY confusing for an end user.

Jdforrester-WMF raised the priority of this task from Low to High.

Eurgh, that's not good. Was there a Parsoid change recently-ish, or is it breakage at our end?

I can confirm this problem exists at least for some months.

Elitre added a subscriber: Elitre.Jun 24 2016, 9:51 AM
Krinkle removed a subscriber: Krinkle.Jul 1 2016, 7:36 PM
ssastry added a subscriber: ssastry.Jul 5 2016, 4:53 PM

This is definitely not new, but this looks like a Parsoid problem with the selective serializer. I think the bug is different from the request in the title of the page. The bug here is that if you edit the content of a div that has a templated style, the edits are being lost. This is a bug with the DOM diff algorithm which probably is mistakenly ignoring edits in nodes marked mw:ExpandedAttrs (as far as I can tell), and has been around since the very beginning. I'll open a new bug report for this and let this task be for the original request (which is allowing edits of <div>s with templated attributes).

ssastry lowered the priority of this task from High to Normal.Apr 24 2017, 10:31 PM
ssastry removed a project: Parsoid.