Pasting bullets containing templates indents incorrectly
Open, Stalled, Needs TriagePublic

Description

Create a bullet list containing:

  • {{Done}} One
  • Two
  • Three

(where {{Done}} is the template). Then select and cut the first bullet, and try to paste it between Two and Three. The result is a mess, looking roughly like this in the editor:

  • Two
  • _
    • {{Done}} One

Three

(where _ is actually blank)

But after saving, it looks like:

  • Two
    • {{Done}} One
    • Three

I set up an example here: https://www.mediawiki.org/wiki/User:KSmith_%28WMF%29/test

ksmith created this task.Jan 26 2016, 12:47 AM
ksmith updated the task description. (Show Details)
ksmith raised the priority of this task from to Needs Triage.
ksmith added a project: VisualEditor.
ksmith added a subscriber: ksmith.
Restricted Application added subscribers: StudiesWorld, Aklapper. · View Herald TranscriptJan 26 2016, 12:47 AM
Jdforrester-WMF changed the task status from Open to Stalled.Feb 9 2016, 8:27 PM
Jdforrester-WMF added a subscriber: Jdforrester-WMF.

This is expected behaviour. The content you cut and pasted was not just "a bullet", it was the start of a list. Pasting a list into a list inserts it as a sub-list rather than merging the content, per user requests previously. We could revisit this, but it'd be awkward to invert the expectation here. The empty line is called a slug and is required to let you insert something else ahead of the sub-list (such as an image), but disappears on edit.

ksmith added a comment.Feb 9 2016, 8:33 PM

But what about the "Three" appearing on a separate line, rather than on a bullet line?

The argument that selecting the first bullet is "selecting a list" rather than "selecting a bullet" makes sense from a technical standpoint, but not really from a user standpoint. I'm pretty sure every other bullet point editor I have used allows you to move the first bullet to a lower position in the same list, without indenting it. Gmail and google docs certainly allow it.