Page MenuHomePhabricator

VisualEditor: Don't close/re-open annotation when pasting text into a comparable context
Closed, ResolvedPublic

Description

Not sure whether this is ContentEditable, DataModel or LinearModel.

When pasting italicised text (from elsewhere on the same page) into an already italicised sentence we currently close, re-open, close, re-open that annotation.

Steps to reproduce problem:

  • start with: <p><i>Original text here.</i></p><p><i>Something else there.</i></p>
  • select "else"
  • copy
  • select "text"
  • paste to replace
  • end state: <p class="ve-ce-branchNode"><i class="ve-ce-TextStyleAnnotation ve-ce-TextStyleItalicAnnotation">Original </i><i class="ve-ce-TextStyleAnnotation ve-ce-TextStyleItalicAnnotation">else</i><i class="ve-ce-TextStyleAnnotation ve-ce-TextStyleItalicAnnotation"> here.</i></p>

Now this wouldn't be a major issue (merely inefficient) if it weren't for bug 48194 in Parsoid.

Real example:


Version: unspecified
Severity: critical

Details

Reference
bz48195

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 1:17 AM
bzimport set Reference to bz48195.

Timo, can you confirm this in master? I think it's been fixed by Ed's change to how annotations are compared…

  • Bug 48489 has been marked as a duplicate of this bug. ***