rem: href = TrimString(hrefInput.value); if (href.length > 0) {  editorShell.BeginBatchChanges(); 
add:  editorShell.BeginBatchChanges(); 
context: function onOK(){  dump("***** Clicked OK in link props dialog\n");  // TODO: VALIDATE FIELDS BEFORE COMMITING CHANGES  href = TrimString(hrefInput.value);  if (href.length > 0) {    // Coalesce into one undo transaction    editorShell.BeginBatchChanges();    // Set the HREF directly on the editor document's anchor node    //  or on the newly-created node if insertNew is true    anchorElement.setAttribute("href",href);    // Get text to use for a new link    if (insertNew) {      // Append the link text as the last child node       //   of the anchor node      dump("Creating text node\n");      newText = TrimString(linkTextInput.value);      if (newText.length == 0) {        ShowInputErrorMessage("You must enter some text for this link.");        linkTextInput.focus();        return false;      }      textNode = editorShell.editorDocument.createTextNode(newText);      if (textNode) {        anchorElement.appendChild(textNode);      }      dump("Inserting\n");      editorShell.InsertElement(anchorElement, false);    } else if (insertLinkAroundSelection) {      // Text was supplied by the selection,      //  so insert a link node as parent of this text      dump("Setting link around selected text\n");      editorShell.InsertLinkAroundSelection(anchorElement);    }    editorShell.EndBatchChanges();  } else if (!insertNew) {    // We already had a link, but empty HREF means remove it    editorShell.RemoveTextProperty("a", "");  }  // Note: if HREF is empty and we were inserting a new link, do nothing    return true;}
meta: 10234	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/10234/dd1fea4e79dd1eac8c26058ce95c469c8fa645eb/EdLinkProps.js/buggy/editor/ui/dialogs/content/EdLinkProps.js