Page MenuHomePhabricator

New line at end of document sometimes merged into previous line on paste
Open, MediumPublic

Description

Copied from bug 58347:

1.Create a page "A" with three links in three consecutive lines.
2.Create another page "B" where you will copy these links to.
3.Copy the first and second link to "B"
4.Save it.
5.Reopen the editor.
6.Now copy the third link and paste it to the third line of "B"
7.Save it.

Observed Result:
The second and the third link in page B is getting merged.

Example Pages:

A:http://en.wikipedia.beta.wmflabs.org/wiki/19th_december_source?veaction=edit
B:http://en.wikipedia.beta.wmflabs.org/wiki/19th_destination


Version: unspecified
Severity: normal

Details

Reference
bz58695

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 2:36 AM
bzimport added a project: VisualEditor.
bzimport set Reference to bz58695.

Can you provide a sample of the relevant HTML your are producing in VE?

The original issue described in this bug is not occurring anymore but a similar issue is found not sure if they are related or not.If not, I will file a separate issue:

1.Create a page "A" with a template Cite Web
2.Create another page "B" where you will copy the template.
3.Add some text or any other element like math function/Link to Page "B"
4.Copy the CiteWeb template created in page A and paste it into the next line of B

Observed Result:
The template gets merged with the previous element/line.

Test Environment: http://en.wikipedia.beta.wmflabs.org/
Browser: Chrome Version 26.0.1410.65
OS: MAC OS X 10. 8. 5
Page:http://en.wikipedia.beta.wmflabs.org/wiki/Copy-paste6th

See the screenshot attached.

Created attachment 14240
Screenshot of template getting merged with the previous line

Attached:

Screen_Shot_2014-01-06_at_2.41.28_PM.png (520×1 px, 124 KB)

HTML dump:

Request URL:http://en.wikipedia.beta.wmflabs.org/w/api.php
Request Method:POST
Status Code:200 OK
Request Headersview source
Accept:application/json, text/javascript, */*; q=0.01
Accept-Charset:ISO-8859-1,utf-8;q=0.7,*;q=0.3
Accept-Encoding:gzip,deflate,sdch
Accept-Language:en-US,en;q=0.8
Connection:keep-alive
Content-Length:10758
Content-Type:application/x-www-form-urlencoded; charset=UTF-8
Cookie:uls-previous-languages=%5B%22en%22%5D; mediaWiki.user.sessionId=IWxgkz08OFNZxaGwaIxUNKilap37xFbY; mediaWiki.user.bucket%3Aext.articleFeedbackv5%4011-tracking=11%3Aignore; mediaWiki.user.bucket%3Aext.articleFeedbackv5%406-form=6%3A6; mediaWiki.user.bucket%3Aext.articleFeedbackv5%405-links=5%3AX; centralnotice_bucket=1-4.2; enwikiLoggedOut=1389029323; centralauth_LoggedOut=1389029332; enwikiUserID=1348; enwikiUserName=RYasmeen+%28WMF%29; enwikiSession=568d9870c44e9934b5912175d6faaea9; centralauth_User=RYasmeen+%28WMF%29; centralauth_Session=0d74cc0544d444b6ba6b684092f01228; edittoolscharsubset=0; ve-beta-welcome-dialog=1
Host:en.wikipedia.beta.wmflabs.org
Origin:http://en.wikipedia.beta.wmflabs.org
Referer:http://en.wikipedia.beta.wmflabs.org/wiki/Copy-paste6th?veaction=edit
User-Agent:Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_5) AppleWebKit/537.31 (KHTML, like Gecko) Chrome/26.0.1410.65 Safari/537.31
X-Requested-With:XMLHttpRequest
Form Dataview sourceview URL encoded
action:visualeditor
paction:serializeforcache
html:<!doctype html><html prefix="dc: http://purl.org/dc/terms/ mw: http://mediawiki.org/rdf/" about="http://en.wikipedia.beta.wmflabs.org/wiki/Special:Redirect/revision/73736"><head prefix="mwr: http://en.wikipedia.beta.wmflabs.org/wiki/Special:Redirect/"><meta property="mw:articleNamespace" content="0"><link rel="dc:replaces" resource="mwr:revision/73705"><meta property="dc:modified" content="2014-01-07T01:05:54.000Z"><meta about="mwr:user/1348" property="dc:title" content="RYasmeen (WMF)"><link rel="dc:contributor" resource="mwr:user/1348"><meta property="mw:revisionSHA1" content="a473161a3483e47f6d590fd9f039238f9303b459"><meta property="dc:description" content=""><meta property="mw:parsoidVersion" content="0"><link rel="dc:isVersionOf" href="en.wikipedia.beta.wmflabs.org/wiki/Copy-paste6th"><title>Copy-paste6th</title><base href="en.wikipedia.beta.wmflabs.org/wiki/Copy-paste6th"></head><body data-parsoid="{&quot;dsr&quot;:[0,277,0,0]}"><p data-parsoid="{&quot;dsr&quot;:[0,20,0,0]}"><a href="./Link_to_catapult" rel="mw:WikiLink" data-parsoid="{&quot;stx&quot;:&quot;simple&quot;,&quot;a&quot;:{&quot;href&quot;:&quot;./Link_to_catapult&quot;},&quot;sa&quot;:{&quot;href&quot;:&quot;link to catapult&quot;},&quot;dsr&quot;:[0,20,2,2]}">link to catapult</a></p>

<p data-parsoid="{&quot;dsr&quot;:[22,31,0,0]}"><a href="./LinkA" rel="mw:WikiLink" data-parsoid="{&quot;stx&quot;:&quot;simple&quot;,&quot;a&quot;:{&quot;href&quot;:&quot;./LinkA&quot;},&quot;sa&quot;:{&quot;href&quot;:&quot;linkA&quot;},&quot;dsr&quot;:[22,31,2,2]}">linkA</a></p>

<p data-parsoid="{&quot;dsr&quot;:[33,42,0,0]}"><a href="./LinkB" rel="mw:WikiLink" data-parsoid="{&quot;stx&quot;:&quot;simple&quot;,&quot;a&quot;:{&quot;href&quot;:&quot;./LinkB&quot;},&quot;sa&quot;:{&quot;href&quot;:&quot;linkB&quot;},&quot;dsr&quot;:[33,42,2,2]}">linkB</a></p>

<p data-parsoid="{&quot;dsr&quot;:[44,101,0,0]}">[<a href="http://en.wikipedia.beta.wmflabs.org/wiki/LinkC|linkC" rel="mw:ExtLink" data-parsoid="{&quot;targetOff&quot;:99,&quot;contentOffsets&quot;:[99,99],&quot;dsr&quot;:[45,100,54,1]}"></a>]</p>

<p data-parsoid="{&quot;dsr&quot;:[103,119,0,0]}"><img class="tex" alt="\pi" src="//upload.beta.wmflabs.org/math/5/2/2/522359592d78569a9eac16498aa7a087.png" typeof="mw:Extension/math" data-mw="{&quot;name&quot;:&quot;math&quot;,&quot;attrs&quot;:{},&quot;body&quot;:{&quot;extsrc&quot;:&quot;\\pi&quot;}}" data-parsoid="{&quot;src&quot;:&quot;&lt;math&gt;\\pi&lt;/math&gt;&quot;,&quot;dsr&quot;:[103,119,2,2]}" about="#mwt7"></p>

<p data-parsoid="{&quot;dsr&quot;:[121,174,0,0]}">text<span class="citation web" about="#mwt2" typeof="mw:Transclusion" data-mw="{&quot;parts&quot;:[{&quot;template&quot;:{&quot;target&quot;:{&quot;wt&quot;:&quot;Cite web&quot;,&quot;href&quot;:&quot;./Template:Cite_web&quot;},&quot;params&quot;:{&quot;url&quot;:{&quot;wt&quot;:&quot;http://yahoo.com&quot;},&quot;title&quot;:{&quot;wt&quot;:&quot;yahoo&quot;}},&quot;i&quot;:0}}]}" data-parsoid="{&quot;stx&quot;:&quot;html&quot;,&quot;dsr&quot;:[125,174,null,null],&quot;pi&quot;:[[{&quot;k&quot;:&quot;url&quot;,&quot;named&quot;:true},{&quot;k&quot;:&quot;title&quot;,&quot;named&quot;:true}]]}"><a rel="mw:ExtLink" href="http://yahoo.com" data-parsoid="{&quot;targetOff&quot;:45,&quot;contentOffsets&quot;:[45,52],&quot;a&quot;:{&quot;href&quot;:&quot;http://yahoo.com&quot;},&quot;sa&quot;:{&quot;href&quot;:&quot;A]]\n\n[[linkB]]\n\n&quot;}}">"yahoo"</a>.</span><span title="ctx_ver=Z39.88-2004&amp;rfr_id=info%3Asid%2Fen.wikipedia.beta.wmflabs.org%3ACopy-paste6th&amp;rft.btitle=yahoo&amp;rft.genre=book&amp;rft_id=http%3A%2F%2Fyahoo.com&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook" class="Z3988" about="#mwt2" data-parsoid="{&quot;stx&quot;:&quot;html&quot;}"><span style="display:none;" data-parsoid="{&quot;stx&quot;:&quot;html&quot;}"><span typeof="mw:Entity" data-parsoid="{&quot;src&quot;:&quot;&amp;nbsp;&quot;,&quot;srcContent&quot;:&quot;&nbsp;&quot;}">&nbsp;</span></span></span></p>

<p data-parsoid="{&quot;dsr&quot;:[176,180,0,0]}">text</p>

<p data-parsoid="{&quot;dsr&quot;:[182,198,0,0]}"><img class="tex" alt="\pi" src="//upload.beta.wmflabs.org/math/5/2/2/522359592d78569a9eac16498aa7a087.png" typeof="mw:Extension/math" data-mw="{&quot;name&quot;:&quot;math&quot;,&quot;attrs&quot;:{},&quot;body&quot;:{&quot;extsrc&quot;:&quot;\\pi&quot;}}" data-parsoid="{&quot;src&quot;:&quot;&lt;math&gt;\\pi&lt;/math&gt;&quot;,&quot;dsr&quot;:[182,198,2,2]}" about="#mwt9"></p>

<p data-parsoid="{&quot;dsr&quot;:[200,204,0,0]}">text</p>

<p data-parsoid="{&quot;dsr&quot;:[206,222,0,0]}"><img class="tex" alt="\pi" src="//upload.beta.wmflabs.org/math/5/2/2/522359592d78569a9eac16498aa7a087.png" typeof="mw:Extension/math" data-mw="{&quot;name&quot;:&quot;math&quot;,&quot;attrs&quot;:{},&quot;body&quot;:{&quot;extsrc&quot;:&quot;\\pi&quot;}}" data-parsoid="{&quot;src&quot;:&quot;&lt;math&gt;\\pi&lt;/math&gt;&quot;,&quot;dsr&quot;:[206,222,2,2]}" about="#mwt11"></p>

<p data-parsoid="{&quot;dsr&quot;:[224,277,0,0]}">text<span class="citation web" about="#mwt5" typeof="mw:Transclusion" data-mw="{&quot;parts&quot;:[{&quot;template&quot;:{&quot;target&quot;:{&quot;wt&quot;:&quot;Cite web&quot;,&quot;href&quot;:&quot;./Template:Cite_web&quot;},&quot;params&quot;:{&quot;url&quot;:{&quot;wt&quot;:&quot;http://yahoo.com&quot;},&quot;title&quot;:{&quot;wt&quot;:&quot;yahoo&quot;}},&quot;i&quot;:0}}]}" data-parsoid="{&quot;stx&quot;:&quot;html&quot;,&quot;dsr&quot;:[228,277,null,null],&quot;pi&quot;:[[{&quot;k&quot;:&quot;url&quot;,&quot;named&quot;:true},{&quot;k&quot;:&quot;title&quot;,&quot;named&quot;:true}]]}"><a rel="mw:ExtLink" href="http://yahoo.com" data-parsoid="{&quot;targetOff&quot;:45,&quot;contentOffsets&quot;:[45,52],&quot;a&quot;:{&quot;href&quot;:&quot;http://yahoo.com&quot;},&quot;sa&quot;:{&quot;href&quot;:&quot;A]]\n\n[[linkB]]\n\n&quot;}}">"yahoo"</a>.</span><span title="ctx_ver=Z39.88-2004&amp;rfr_id=info%3Asid%2Fen.wikipedia.beta.wmflabs.org%3ACopy-paste6th&amp;rft.btitle=yahoo&amp;rft.genre=book&amp;rft_id=http%3A%2F%2Fyahoo.com&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook" class="Z3988" about="#mwt5" data-parsoid="{&quot;stx&quot;:&quot;html&quot;}"><span style="display:none;" data-parsoid="{&quot;stx&quot;:&quot;html&quot;}"><span typeof="mw:Entity" data-parsoid="{&quot;src&quot;:&quot;&amp;nbsp;&quot;,&quot;srcContent&quot;:&quot;&nbsp;&quot;}">&nbsp;</span></span></span></p><span typeof="mw:Transclusion" data-mw="{&quot;parts&quot;:[{&quot;template&quot;:{&quot;target&quot;:{&quot;wt&quot;:&quot;Cite web&quot;,&quot;href&quot;:&quot;./Template:Cite_web&quot;},&quot;params&quot;:{&quot;url&quot;:{&quot;wt&quot;:&quot;http://yahoo.com&quot;},&quot;title&quot;:{&quot;wt&quot;:&quot;yahoo&quot;}},&quot;i&quot;:0}}]}" data-ve-no-generated-contents="true" class="citation web"></span><p></p></body></html>
page:Copy-paste6th
oldid:73736
format:json
Response Headersview source
Accept-Ranges:bytes
Age:0
Cache-control:private
Connection:keep-alive
Content-Encoding:gzip
Content-Length:97
Content-Type:application/json; charset=utf-8
Date:Tue, 07 Jan 2014 01:12:09 GMT
Server:Apache
Vary:Accept-Encoding
Via:1.1 varnish, 1.1 varnish
X-Cache:deployment-cache-text1 miss (0), deployment-cache-text1 frontend miss (0)
X-Content-Type-Options:nosniff
X-Frame-Options:SAMEORIGIN
X-Powered-By:PHP/5.3.10-1ubuntu3.9+wmf1
X-Varnish:239733000, 2143990872
X-Vary-Options:Accept-Encoding;list-contains=gzip

In ryasmeen's HTML dump the last paragraph contains both the text and the pasted citation. Apparently the VE rendering showed the citation in a separate line, so the discrepancy in the HTML emitted by VE (citation actually in the preceding paragraph) seems to be a bug in VE. Moving this to VE for that reason.