Page MenuHomePhabricator

VisualEditor: Categories deleted or misplaced when a reference is added (in Opera)
Closed, ResolvedPublic




Event Timeline

bzimport raised the priority of this task from to Low.Nov 22 2014, 1:48 AM
bzimport set Reference to bz50385.

Very strange, looks like metadata is being moved somehow. Do we have any information about what the editors did to provoke this?

(In reply to comment #1)

Another is


Both these corruptions were by you - were both of them made using Opera? If so, I'm happy to mark this bug out to you (but please clean up after yourself when editing using a blacklisted browser).

Eh, it seems to be Opera-specific after all, I can't reproduce on Firefox (but it reproduces reliably in Opera).

Funnily, my testing shows that the categories are only moved inside the reference if it contains a template. Inserting an empty or text-only reference results in the cateogires eing killed entirely.

function testSpliceBroken() {
var n = 256;
var a = [];
a[n] = 'a';

a.splice( n+1, 0, 'b' );

return a[n] != 'a';

This yields 'true' on Opera.

That's probably the bizarrest browser bug I've ever seen, and it seems to be the root cause of this.

Change 72233 had a related patch set uploaded by Matmarex:
Array.prototype.splice polyfill for Opera

Change 72233 merged by jenkins-bot:
Array.prototype.splice polyfill for Opera

This should be fixed now. Rejoice!

Done and will be deployed tomorrow.