Last modified: 2014-02-06 06:42:23 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T62375, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 60375 - VisualEditor: Adding a template and removing a non-breaking space (nbsp) causes span tags with data-ve-ignore
VisualEditor: Adding a template and removing a non-breaking space (nbsp) cau...
Status: RESOLVED FIXED
Product: VisualEditor
Classification: Unclassified
Data Model (Other open bugs)
unspecified
All All
: High normal
: VE-deploy-2014-02-06
Assigned To: Ed Sanders
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-01-23 19:50 UTC by WhatamIdoing
Modified: 2014-02-06 06:42 UTC (History)
9 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description WhatamIdoing 2014-01-23 19:50:24 UTC
Intention:
Add a template and remove a non-breaking space ( ) in the same line/paragraph

Steps to Reproduce:
(Order matters!)

1.  Begin with a page that contains the HTML code for a non-breaking space.  Open in VisualEditor.

2.  On the line that contains the nbsp, add a template (e.g., {{fact}}).  The template should be added to the same 'word' that contains the nbsp.

3.  Then remove the nbsp (replace with a plain space, or just delete the whole 'word').

Actual Results:  
VisualEditor added span text like <span about="g0.42287685585435686" data-ve-ignore="true"></span> when the nbsp was removed.

Adding a fact template to the end of:

1&nbsp;mg 2&nbsp;mg 3&nbsp;mg 4&nbsp;mg

turns into:

1&nbsp;mg 2&nbsp;mg 3&nbsp;mg 4 mg{{Fact}}<span data-ve-ignore="true" about="g0.5170239245053381"></span>

However, adding the template to "3 mg" and deleting the nbsp from "2 mg" works correctly:

1&nbsp;mg 2 mg 3&nbsp;mg{{Fact}} 4&nbsp;mg




Reproducible: Always

See https://en.wikipedia.org/w/index.php?title=Wikipedia%3AVisualEditor%2FFeedback&diff=591972176&oldid=591955710 and testing at https://en.wikipedia.org/w/index.php?title=User:Jay8g/sandbox&action=history on 23 January 2014 for many more details.

Found in Firefox 26 on Windows 7 with Monobook, confirmed in Safari 6 on Mac OS 10.8.5 with Vector.
Comment 1 WhatamIdoing 2014-01-24 16:31:36 UTC
This also appears if you add any template after a {{convert}} template, and then remove the {{convert}} template.

If there are multiple nbsp's on the same line, them it is only the removal of the nbsp that is immediately before the template that appears to trigger it.
Comment 2 Ed Sanders 2014-02-05 20:52:31 UTC
Probably a duplicate of bug 60897

See if the fix there resolves this.
Comment 3 James Forrester 2014-02-06 06:42:23 UTC
From following WhatAmIDoing's instructions, I can replicate in enwiki and it's fixed in Beta Labs; marking as FIXED.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links