Page MenuHomePhabricator

When pasting a mix of <del>eted and nondeleted text into the visual editor, the deleted text is not shown
Closed, ResolvedPublic1 Estimated Story Points

Description

Steps to reproduce

  1. Copy some text, some of which is struck out with a <del> element and some of which isn't. For example, this sentence: "don't delete me!"
  2. Try to paste it into the visual editor.
  3. Only the text which isn't struck out will appear.

This is particularly problematic because deleted text in Mediawiki diffs is marked up with a non-displayed <del> element. For example, the text removed in this edit will be copied as <del>He</del> <del>was</del> <del>a</del> <del>serving</del> <del>soldier</del>. If this is pasted into the visual editor, only the spaces will appear.

Verified in Firefox 41 and Chrome 44.

Event Timeline

bzimport raised the priority of this task from to Needs Triage.Nov 22 2014, 3:08 AM
bzimport added a project: VisualEditor.
bzimport set Reference to bz64760.

Created attachment 15278
The text that was supposed to be pasted here began, "The history of the custom is rooted not necessarily for the provision of goods...

Attached:

Screen_Shot_showing_incomplete_paste_of_text_in_Firefox_2014-05-02_at_9.15.15_AM.png (150×409 px, 31 KB)

Created attachment 15279
This paste should have read, "Men are rarely present at bridal showers. However, there have been "Wedding Showers" in which the groom, groomsmen and friends of the groom attend the wedding shower."

Attached:

Screen_Shot_showing_incomplete_paste_of_text_in_Safari_2014-05-02_at_11.02.37_AM.png (174×453 px, 29 KB)

Created attachment 15280
This paste is the same as the previous one in Safari, but retained the diff (table) formatting

Attached:

Screen_Shot_showing_incomplete_pasting_with_diff_formatting_in_Safari_2014-05-02_at_11.05.30_AM.png (173×956 px, 26 KB)

I think we have another version of this at https://en.wikipedia.org/w/index.php?oldid=614417933#Cut_and_paste_from_a_diff

This time, the copying was from a diff. The computer was running Chrome on Mac OS X Mavericks.

Jdforrester-WMF changed the task status from Open to Stalled.Feb 2 2015, 7:24 PM
nshahquinn-wmf renamed this task from VisualEditor: Sometimes pasting text into a page results in only part of the text appearing. to When pasting a mix of <del>eted and nondeleted text into the visual editor, the deleted text is not shown.Jul 23 2015, 9:16 PM
nshahquinn-wmf changed the task status from Stalled to Open.
nshahquinn-wmf triaged this task as High priority.
nshahquinn-wmf updated the task description. (Show Details)
nshahquinn-wmf set Security to None.

Change 238872 had a related patch set uploaded (by Jforrester):
StrikethroughAnnotation: Alias <del> tags like we do for <code>/<tt>

https://gerrit.wikimedia.org/r/238872

Change 238872 merged by jenkins-bot:
StrikethroughAnnotation: Alias <del> tags like we do for <code>/<tt>

https://gerrit.wikimedia.org/r/238872