rem:  editorShell.InsertElement(imageElement, true); 
add: try {  editorShell.InsertElementAtSelection(imageElement, true); } catch (e) { dump("Exception occured in InsertElementAtSelection\n"); } 
context: function onOK(){  // handle insertion of new image  if (ValidateData())  {    // All values are valid - copy to actual element in doc or     //   element created to insert    editorShell.CloneAttributes(imageElement, globalElement);    if (insertNew)    {      // 'true' means delete the selection before inserting      editorShell.InsertElement(imageElement, true);    }    return true;  }  return false;}
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/6df53d78e87da76212f26738e05ec918d9d1125c/EdImageProps.js/buggy/editor/ui/dialogs/content/EdImageProps.js