Page MenuHomePhabricator

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


Div tags like the ones seen in cause "alienated content"/prevent people from editing the page. VisualEditor should support div tags.

Version: unspecified
Severity: normal



Event Timeline

bzimport raised the priority of this task from to Low.Nov 22 2014, 3:24 AM
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?

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.Jun 23 2016, 9:07 AM
Jdforrester-WMF added a project: Parsoid.

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.

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 Medium.Apr 24 2017, 10:31 PM
ssastry removed a project: Parsoid.