Page MenuHomePhabricator

VisualEditor: Adding an image at the top of a list puts the image inside the list
Open, LowPublic

Description

Steps to reproduce

Start with a section whose contents are:

==Heading==
* Alice
* Bob
* Chris

Place the cursor just before the 'A' in 'Alice' and insert an image.

The image will be placed inside the first list item:

==Heading==
* [[File:Example.jpg]]Alice
* Bob
* Chris

Editors almost never place images inside list items so they are likely to expect this to produce the following wikitext instead:

==Heading==
[[File:Example.jpg]]
* Alice
* Bob
* Chris

See https://en.wikipedia.org/w/index.php?title=User:Whatamidoing_(WMF)/sandbox&diff=577354576&oldid=577352415 for an example (look for the image of the apple).

Details

Reference
bz55767

Event Timeline

bzimport raised the priority of this task from to Low.Nov 22 2014, 2:38 AM
bzimport set Reference to bz55767.
nshahquinn-wmf renamed this task from VisualEditor: Adding an image at the top of a list puts the image inside the list; instead it should insert it in the previous position (in the <p>) to VisualEditor: Adding an image at the top of a list puts the image inside the list.Jul 24 2015, 5:57 PM
nshahquinn-wmf updated the task description. (Show Details)
nshahquinn-wmf set Security to None.

Same thing happen at the bottom of the list.
Example at w:no:Øvre Vang kirke.

Note that preview in VisualEditor/WikitextEditor seems to do it right. Or at least different.

It is not enough to add a newline to break out of the list.

This isn't about the VisualEditor, it is about the PHP Parser?