Prototype version: 1.5.0
Problem description:
IE6 gives "Invalid target element for this operation" error on attempting to insert a new TD after an existing cell. (In my case the existing cell was a TH at the beginning of the row, but I assume the same error would happen if the existing cell was a TD, or if it wasn't the first cell in the row.)
Possible patch (works for me): Just beneath these two lines at L1631:
if (['TBODY', 'TR'].include(tagName)) {
this.insertContent(this.contentFromAnonymousTable());
... insert more of the same:
} else if (['TH', 'TD'].include(tagName)) {
this.insertContent(this.contentFromAnonymousTableRow());
Definition of new function contentFromAnonymousTableRow:
contentFromAnonymousTableRow: function() {
var div = document.createElement('div');
div.innerHTML = '<table><tbody><tr>' + this.content + '</tr></tbody></table>';
return $A(div.childNodes[0].childNodes[0].childNodes[0].childNodes);
}