Page MenuHomePhabricator

VisualEditor: Type mismatch when inserting unbalanced content
Closed, ResolvedPublic

Description

Author: orbit

Description:
Steps to reproduce:

  1. Copy part of a headline and part of a following paragraph
  2. Paste into a paragrah

The linmod being inserted will look something like this:
["s", "u", "m", "?", Object, Object, "C", "o", "n", "t"]

The objects are closing heading and opening paragraph.

The error is in ve.dm.Document.js on 1145.


Version: unspecified
Severity: normal

Details

Reference
bz42806

Event Timeline

bzimport raised the priority of this task from to High.Nov 22 2014, 12:54 AM
bzimport set Reference to bz42806.

Now being done by Trevor; reassigning.

I0d2b593e05ebdee807e2cc6eeb902d542db3895f is a start, but there's still some issues.

Given the target: <p>12[cursor]34</p>

OK: ab</p><p>cd
OK: ab</h2><p>cd
BAD: ab</p></li><p>cd

orbit wrote:

ab</p></li><p>cd is invalid markup anyway.

I believe Trevor meant ab</p></li></ol><p>cd breaking.

Id9269a29e51ca213508de8f155d3feec5e5b0774 should resolve this