Pasted a bold colon inside a bold and it goes… poorly.
https://www.mediawiki.org/w/index.php?diff=2217801&oldid=2217755&title=Editing/FY2016-17Q2_Planning
Pasted a bold colon inside a bold and it goes… poorly.
https://www.mediawiki.org/w/index.php?diff=2217801&oldid=2217755&title=Editing/FY2016-17Q2_Planning
Test case:
<p><b id="a">Foo</b></p>
<p><b id="b">Bar</b></p>
Copy an 'o' to the end of 'Bar' and you get:
<p><b id="b">Bar<b id="a">o</b></b></p>
I think this goes back a long way (I see this same behaviour in revisions from 2014).
Change 344417 had a related patch set uploaded (by DLynch):
[VisualEditor/VisualEditor@master] SurfaceFragment: avoid double-annotating in insertContent
That patch fixes Ed's test case. It makes the assumption that when moving content around like this, all that matters is the comparable annotation objects, and discards the ones on the pasted content which are comparable-to the surrounding annotations that are going to get applied.
I chose the order of application that'll get us <p><b id="b">Baro</b></p>, but it'd be easy to adjust it so we get <p><b id="b">Bar</b><b id="a">o</b></p> instead. It's just a matter of which annotation set gets priority.
If the approach seems good, I can add it for external pastes as well.
Change 344417 merged by jenkins-bot:
[VisualEditor/VisualEditor@master] SurfaceFragment: avoid double-annotating in insertContent
Change 344692 had a related patch set uploaded (by Jforrester):
[mediawiki/extensions/VisualEditor@master] Update VE core submodule to master (7b51cb6ab)
Change 344692 merged by jenkins-bot:
[mediawiki/extensions/VisualEditor@master] Update VE core submodule to master (7b51cb6ab)
Change 344813 had a related patch set uploaded (by DLynch):
[VisualEditor/VisualEditor@master] SurfaceFragment: Avoid double-annotating in insertDocument, as well
Change 344813 merged by jenkins-bot:
[VisualEditor/VisualEditor@master] SurfaceFragment: Avoid double-annotating in insertDocument, as well
Change 344803 had a related patch set uploaded (by Jforrester):
[mediawiki/extensions/VisualEditor@master] Update VE core submodule to master (495cd7d65)
Change 344803 merged by jenkins-bot:
[mediawiki/extensions/VisualEditor@master] Update VE core submodule to master (495cd7d65)