rem:  editorShell.InsertElementAtSelection(tableElement, false); 
add:  editorShell.InsertElementAtSelection(tableElement, true); 
context: function onOK(){  if (ValidateData())  {    editorShell.BeginBatchChanges();    editorShell.CloneAttributes(tableElement, globalElement);    // Create necessary rows and cells for the table    // AFTER BUG 30378 IS FIXED, DON'T INSERT TBODY!    var tableBody = editorShell.CreateElementWithDefaults("tbody");    if (tableBody)    {      tableElement.appendChild(tableBody);      // Create necessary rows and cells for the table      for (var i = 0; i < rows; i++)      {        var newRow = editorShell.CreateElementWithDefaults("tr");        if (newRow)        {          tableBody.appendChild(newRow);          for (var j = 0; j < columns; j++)          {            var newCell = editorShell.CreateElementWithDefaults("td");            if (newCell)            {              newRow.appendChild(newCell);            }          }        }      }    }    // Detect when entire cells are selected:      // Get number of cells selected    var tagNameObj = new Object;    var countObj = new Object;    tagNameObj.value = "";    var element = editorShell.GetSelectedOrParentTableElement(tagNameObj, countObj);    var deletePlaceholder = false;    if (tagNameObj.value == "table")    {      //Replace entire selected table with new table, so delete the table      editorShell.DeleteTable();    }    else if (tagNameObj.value == "td")    {      if (countObj.value >= 1)      {        if (countObj.value > 1)        {          // Assume user wants to replace a block of          //  contiguous cells with a tabl, so          //  join the selected cells          editorShell.JoinTableCells(false);                    // Get the cell everything was merged into          element = editorShell.GetFirstSelectedCell();                    // Collapse selection into just that cell          editorShell.editorSelection.collapse(element,0);        }        if (element)        {          // Empty just the contents of the cell          editorShell.DeleteTableCellContents();                    // Collapse selection to start of empty cell...          editorShell.editorSelection.collapse(element,0);          // ...but it will contain a <br> placeholder          deletePlaceholder = true;        }      }    }    try {      // false means don't delete selected text when inserting      editorShell.InsertElementAtSelection(tableElement, false);    } catch (e) {      dump("Exception occured in InsertElementAtSelection\n");    }    if (deletePlaceholder && tableElement && tableElement.nextSibling)    {      // Delete the placeholder <br>      editorShell.DeleteElement(tableElement.nextSibling);    }    editorShell.EndBatchChanges();    SaveWindowLocation();    return true;  }  return false;}
meta: 10234	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/10234/dabe980b15ae6ed27a0bb2457f5205202d18dff5/EdInsertTable.js/clean/editor/ui/dialogs/content/EdInsertTable.js