VisualEditor: Sometimes it's somehow possible for VE/Parsoid to insert a <br> at the start of a heading



I was adding a heading (after a <!-- ... --> comment) and the diff stuck a <br> inside the ==heading==.

I'm assigning this bug to VE for the moment, but it could be a parsoid bug. I need to see the intermediate parsoid HTML generated for the change to tell one way or the other.

Version: unspecified
Severity: minor

bzimport set Reference to bz51444.
cscott created this task.Via LegacyJul 16 2013, 2:57 PM
cscott added a comment.Via ConduitJul 16 2013, 3:04 PM

See also

So the <!-- ... --> comment doesn't seem to have anything to do with it.

cscott added a comment.Via ConduitJul 16 2013, 3:17 PM

AzaToth made a screencast at showing the issue.

Gwicke filed bug 50683 on the parsoid side -- we shouldn't allow newlines in a heading when we serialize to wikitext.

But there's still a VE issue -- where is the ↵ coming from (visible in AzaToth's screencast). VE shouldn't be putting the newline inside the heading.

ssastry added a comment.Via ConduitJul 25 2013, 3:53 PM
  • Bug 52021 has been marked as a duplicate of this bug. ***
Jdforrester-WMF added a comment.Via ConduitSep 25 2013, 12:33 AM

Does anyone have any steps to reproduce? I can't reproduce in Firefox or Chrome whilst playing around…

Elitre added a comment.Via ConduitSep 25 2013, 3:00 PM

The steps are clear in AzaToth's video, but I can't reproduce that either: have you fixed something about ↵ being displayed, this week?

Elitre added a comment.Via ConduitSep 25 2013, 3:08 PM

(BTW, I really couldn't play that vid on YouTube.)

Jdforrester-WMF moved this task to Backlog on the VisualEditor workboard.Via WebNov 24 2014, 4:17 PM
Jdforrester-WMF closed this task as "Declined".Via WebMar 5 2015, 11:52 PM
Jdforrester-WMF claimed this task.

No reproduction steps in > 18 months. If you can give some more details, please re-open.

Elitre reopened this task as "Open".EditedVia WebMar 6 2015, 2:23 PM

Providing steps.

  1. Start with a new or a blank page.
  2. In wikitext mode, write something on the first line, leave a blank line, write a hidden comment, leave a blank line, write something else, then Save.
  3. Now enter VE mode. Notice the hidden comment is correctly displayed as an exclamation mark; there is now a carriage return sign at the beginning of the last line.
  4. Put the cursor in the blank line between the comment and the last written line. You can now write any word, select it and turn it into a heading or a subheading; notice the entire line below, including the carriage return sign, also becomes part of said heading/subheading.
  5. Save. You now have wikitext for the heading/subheading you just made, showing up in plain sight. You can also notice that the carriage return character was turned into a br tag.

Reproducible: Always.
Tested in Win 8 with the latest versions of Chrome, Firefox, IE, Opera (the last two while logged out).

Elitre changed the title from "VisualEditor: Sometimes it's somehow possible for VE/Parsoid to insert a <br/> at the start of a heading" to "VisualEditor: Sometimes it's somehow possible for VE/Parsoid to insert a <br> at the start of a heading".Via WebTue, Mar 31, 12:44 PM
Elitre edited the task description. (Show Details)
Elitre set Security to None.

The page is nominated for deletion, but here's another example.

Add Comment

Column Prototype
This is a very early prototype of a persistent column. It is not expected to work yet, and leaving it open will activate other new features which will break things. Press "\" (backslash) on your keyboard to close it now.