Page MenuHomePhabricator

VisualEditor: Template {{-}} can be moved into following heading because it doesn't render
Closed, ResolvedPublic

Description

en.wp user Redrose64 reports:
With this edit: https://en.wikipedia.org/w/index.php?title=Paisley_Gilmour_Street_railway_station&diff=prev&oldid=567709873 "the {{-}} was moved from the bottom of a section into a heading, effectively yielding the HTML <h3><span class="mw-headline" id="2013">2013<br style="clear:both;" /></span>[edit]</h3> "

I can reproduce that on that article by:

  1. Deleting with backspace the header "Post-2008" (and nothing else)
  2. Typing "2013"

I can't reproduce it in my sandbox with {{-}} (or {{clear}}) before a header and then changing the header.


Version: unspecified
Severity: normal

Details

Reference
bz52658

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 2:00 AM
bzimport set Reference to bz52658.

Unfortunately, I am having a hard time reproducing the bug now. And, as you noted, I am not able to copy it to my sandbox and reproduce it either. This may have been some glitch in how VE might have modified the DOM on editing there.

Can you verify that you can reproduce the error on the latest version or that oldid? I even added a newline space back in case that matters (since that is what was present in the oldid).

After about 5 minutes trying I can't reproduce this now on either the present or old revisions of that page. I haven't tried again in my sandbox but given the other findings I wouldn't expect it to.

The only change is I'm now running Firefox 23 rather than the 22 I was running when I reported this (and I don't know how to keep separate versions of the same program available at the same time, sorry)

Having tried again, I still can't reproduce it. The original edit that caused this was by an anonymous user who hasn't edited since, so we're unlikely to get any more information from them.

Should this be closed (WORKSFORME?) and then just reopened if it happens again in future?

I agree with your recommendation, Chris.

I think this was a valid bug, but it might have been specific to a particular set of conditions at the time of the bug (cached HTML, what the user was doing, the state that VE was in and the HTML it generated, source wikitext) which we are having a hard time reproducing now. So, I am going to close this bug for now and we can reopen this or a new one if a similar error shows up.

I reproduced it - not precisely, but close enough.

I pretended I was a brand new editor, and rather than changing the heading I created a new one, above the old. Then I deleted the old and applied formatting to the new word I typed.

This rendered this: http://en.wikipedia.org/w/index.php?title=User%3AMdennis_%28WMF%29%2Fsandbox&diff=568643085&oldid=568642989

The template moved, but in front of rather than behind the word.

I'm using Chrome.

I tried it again on Firefox, and caught the template again:
https://en.wikipedia.org/w/index.php?title=User%3AMdennis_%28WMF%29%2Fsandbox&diff=568643930&oldid=568643677

I guess that the IP editor may have positioned his cursor slightly differently, but that seems to be the behavior that led to the issue. It seems like potentially an easy decision to make.

Moving to VisualEditor:

[16:19] <RoanKattouw> That looks like a VE issue
[16:20] <RoanKattouw> It's probably because {{-}} doesn't produce any visible output (it outputs a <br> with clear: both;)
[16:20] <RoanKattouw> And so people don't notice when their backspace or delete presses cause the {{-}} to be moved into a different paragraph which they then mark up as a heading

Because Subbu and Gabriel asked: this is a VE bug, not a Parsoid bug. Unfortunately it's not very clear where the {{-}} template is exactly because it doesn't really produce visible output. So pressing backspace or delete can cause the {{-}} to move to a different paragraph, which may be styled as a heading or restyled by the user to be a heading. And you don't really notice that you're doing this because it's not visible.

  • This bug has been marked as a duplicate of bug 49806 ***