Page MenuHomePhabricator

Pasted wikitext of template with prefilled parameter is inserted as a block even if it's inlineable, so you can't then edit around it
Open, MediumPublic1 Estimated Story Points

Description

I have some difficulty describing this properly (as can be inferred from the title), but here's how to reproduce the issue:

  1. Copy some template code with prefilled parameter values, e.g.: {{Ping|a}}
  2. Go to some Wikipedia page, e.g. https://de.wikipedia.org/w/index.php?title=Testpage&veaction=edit
  3. Paste the code

On first sight, VE seems to do just fine adding that template. However, it is impossible to properly work with the inserted bit. You cannot, for instance, add some text immediately before or after the template (so as to, say, make it part of a sentence) -- you can only add new paragraph above/below it. Likewise, it's not possible to make it part of a list. This behavior differs from what happens when you use VE to generate the template in first place. (Chrome 55)

Event Timeline

When I do this:

  1. Open the page
  2. Type * (to start a bullet list)
  3. Paste {{Ping|a}}

I get an indented paragraph whose full width is the template block. The bullet is not visible. I cannot place my cursor either at the start or at the end of the template.

However, when I switch to the 2010 wikitext editor, the wikitext I see is:

* {{Ping|a}}

– which is correct.

Jdforrester-WMF renamed this task from Template code with prefilled parameter values not properly handled by VE to Pasted wikitext of template with prefilled parameter is inserted as a block even if it's inlineable, so you can't then edit around it.Mar 14 2017, 7:20 PM
Jdforrester-WMF triaged this task as Medium priority.
Jdforrester-WMF set the point value for this task to 1.
Jdforrester-WMF moved this task from To Triage to TR1: Releases on the VisualEditor board.
Jdforrester-WMF subscribed.

When we adjust templates we run that odd block/inline code to try to a guesstimate if the user can edit around it; we should do that here too.