Steps to replicate the issue (include links if applicable):
- Create/edit a Wikipedia article.
- Do a lot of the following:
- Add a citation.
- Copy or cut, then paste a reference, sometimes multiple times. Sometimes the reference is of the form <ref>...</ref>, sometimes <ref name="foo">...</ref>, and sometimes <ref name="foo" />.
- Drag and drop a reference.
- Delete a citation.
- Switch to source editing and then back to visual editing. I don't think I modified any of the citations, but it's possible.
What happens?:
Sometimes some of the references will trade places.
What should have happened instead?:
I don't care what the internal names are or which reference is the primary one, but the references (as defined by their contents) should remain attached to the article text I put them with.
Software version (skip for WMF-hosted wikis like Wikipedia):
Wikipedia, whatever versions were used on 28 September 2023 (currently today).
Other information (browser name/version, screenshots, etc.):
Browser info:
- Name: Firefox
- Version: 118.0
- Build ID: 20230918143747
- Distribution ID:
- Update Channel: release
- User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/118.0
- OS: Windows_NT 10.0 19045
- Extensions that are most likely to be relevant:
- Dark Reader, version 4.9.66
- uBlock Origin, version 1.52.2
Here's a screenshot demonstrating the issue. The source shown next to the quote is not the source I put next to the quote.
I am proficient in JavaScript, and I have experience finding edge cases, but I'm having trouble finding the relevant part of the code between all the codebases (MediaWiki, VisualEditor, and Citoid, as far as I'm aware), but if you point me to the relevant code, I'm happy to try to help.
P.S. I had a possibly better description, but I included an image, and decided to click on it in the preview to double-check it, and it loaded in the same tab, and when I went back, I lost everything I typed here...