the javascript on Special:Upload is crashing and not doing its work. Firebug reports the error is on upload.js line 56: optionsTable.children is undefined.
Version: 1.16.x
Severity: critical
the javascript on Special:Upload is crashing and not doing its work. Firebug reports the error is on upload.js line 56: optionsTable.children is undefined.
Version: 1.16.x
Severity: critical
I checked with a friend who's also running a recent copy of the trunk code, and he confirms that the javascript crashes out with 'optionsTable.children is undefined' and doesn't do the interactive stuff.
I think perhaps the line:
optionsTable.insertBefore( row, optionsTable.children[1] );
should perhaps be:
optionsTable.insertBefore( row, optionsTable.rows[1] );
This is just looking at the TableSection interface. I did no testing to see if this theory is correct. (but I'll put it on my to do list to see if that solves the issue)
var optionsTable = document.getElementById( 'mw-htmlform-description' ).tBodies[0];
so optionsTable is a TBODY, which is of type HTMLTableSectionElement (http://www.w3.org/TR/DOM-Level-2-HTML/html.html#ID-67417573) and not of type HTMLCollection. So rows (which is a HTMLCollection) should indeed be used.
Though I note that you can also use insertRow. http://www.w3.org/TR/DOM-Level-2-HTML/html.html#ID-93995626
Upping the priority of this Firefox Javascript error. Should really be fixed before a release.
Bryan.TongMinh wrote:
My Firefox does have an optionsTable.children. Is this non-standard behaviour?
(In reply to comment #9)
My Firefox does have an optionsTable.children. Is this non-standard behaviour?
Apparently; according to the MDC .children was introduced in FF 3.5. There is no mention of whether or not this is a non-standard extension, though.
optionsTable.childNodes has worked since like the beginning of (DOM) time and does the same, except that it includes TextNodes while .children doesn't.