rem: imageElement.setAttribute(attributes[i], imageElement.getAttribute(attributes[i])); 
add: imageElement.setAttribute(attributes[i], imgElement.getAttribute(attributes[i])); 
context: function Startup(){  var editor = GetCurrentEditor();  if (!editor)  {    window.close();    return;  }  gDialog = {    inputName:      document.getElementById( "InputName" ),    inputDisabled:  document.getElementById( "InputDisabled" ),    inputTabIndex:  document.getElementById( "InputTabIndex" )  };  ImageStartup();  // Get a single selected input element  var tagName = "input";  try {    imageElement = editor.getSelectedElement(tagName);  } catch (e) {}  if (imageElement)  {    // We found an element and don't need to insert one    gInsertNewImage = false;  }  else  {    gInsertNewImage = true;    // We don't have an element selected,    //  so create one with default attributes    try {      imageElement = editor.createElementWithDefaults(tagName);    } catch(e) {}    if (!imageElement )    {      dump("Failed to get selected element or create a new one!\n");      window.close();      return;    }    var imgElement;    try {      imgElement = editor.getSelectedElement("img");    } catch(e) {}    if (imgElement)    {      // We found an image element, convert it to an input type="image"      var attributes = ["src", "alt", "width", "height", "hspace", "vspace", "border", "align", "usemap", "ismap"];      for (i in attributes)        imageElement.setAttribute(attributes[i], imageElement.getAttribute(attributes[i]));    }  }  // Make a copy to use for AdvancedEdit  globalElement = imageElement.cloneNode(false);  // We only need to test for this once per dialog load  gHaveDocumentUrl = GetDocumentBaseUrl();  InitDialog();  // Save initial source URL  gOriginalSrc = gDialog.srcInput.value;  // By default turn constrain on, but both width and height must be in pixels  gDialog.constrainCheckbox.checked =    gDialog.widthUnitsMenulist.selectedIndex == 0 &&    gDialog.heightUnitsMenulist.selectedIndex == 0;  SetTextboxFocus(gDialog.inputName);  SetWindowLocation();}
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/e8225239d295a342ad9b3b8fc3a9f7a821a962c0/EdInputImage.js/buggy/editor/ui/dialogs/content/EdInputImage.js