rem: SetTextfieldFocus(dialog.ColorInput); 
add: SetTextboxFocus(dialog.ColorInput); 
context: function Startup(){  if (!window.arguments[1])  {    dump("EdColorPicker: Missing color object param\n");    return;  }  window.arguments[1].Cancel = false;  // Create dialog object to store controls for easy access  dialog = new Object;  dialog.ColorPicker      = document.getElementById("ColorPicker");  dialog.ColorInput       = document.getElementById("ColorInput");  dialog.LastPickedButton = document.getElementById("LastPickedButton");  dialog.LastPickedColor  = document.getElementById("LastPickedColor");  dialog.TableRadio       = document.getElementById("TableRadio");  dialog.CellRadio        = document.getElementById("CellRadio");  dialog.Ok               = document.getElementById("ok");  dialog.ColorSwatch      = document.getElementById("ColorPickerSwatch");    // The type of color we are setting:   //  text: Text, Link, ActiveLink, VisitedLink,   //  or background: Page, Table, or Cell  if (window.arguments[1].Type)  {    ColorType = window.arguments[1].Type;    // Get string for dialog title from passed-in type     //   (note constraint on editor.properties string name)    window.title = GetString(ColorType+"Color");  }  if (!window.title)    window.title = GetString("Color");  dialog.ColorInput.value = "";  var tmpColor;  // window.arguments[1] is object to set initial and return color  switch (ColorType)  {    case "Page":      tmpColor = window.arguments[1].PageColor;      if (tmpColor && tmpColor.toLowerCase() != "window")        color = tmpColor;      break;    case "Table":      if (window.arguments[1].TableColor)        color = window.arguments[1].TableColor;      break;    case "Cell":      if (window.arguments[1].CellColor)        color = window.arguments[1].CellColor;      break;    case "TableOrCell":      TableOrCell = true;      document.getElementById("TableOrCellGroup").setAttribute("collapsed", "false");      if (window.arguments[1].TableColor)      {        color = window.arguments[1].TableColor;        dialog.TableRadio.checked = true;      }      else       {        color = window.arguments[1].CellColor;        dialog.CellRadio.checked = true;      }      break;    default:      // Any other type will change some kind of text,      TextType = true;      tmpColor = window.arguments[1].TextColor;      if (tmpColor && tmpColor.toLowerCase() != "windowtext")        color = window.arguments[1].TextColor;      break;  }  SetCurrentColor(color)  if (TextType)    LastPickedColor = dialog.LastPickedColor.getAttribute("LastTextColor");  else    LastPickedColor = dialog.LastPickedColor.getAttribute("LastBackgroundColor");  dialog.LastPickedColor.setAttribute("style","background-color: "+LastPickedColor);  doSetOKCancel(onOK, onCancelColor);  // Set method to detect clicking on OK button  //  so we don't get fooled by changing "default" behavior  dialog.Ok.setAttribute("onclick", "onOKClick()");  // Make the "Last-picked" the default button  //  until the user selects a color  dialog.Ok.removeAttribute("default");  dialog.LastPickedButton.setAttribute("default","true");  // Caller can prevent user from submitting an empty, i.e., default color  NoDefault = window.arguments[1].NoDefault;  if (NoDefault)  {    // Hide the "Default button -- user must pick a color    document.getElementById("DefaultColorButton").setAttribute("collapsed","true");  }  SetTextfieldFocus(dialog.ColorInput);  SetWindowLocation();}
meta: 10234	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/10234/1e7ee6f0f96dbc0326edd55283ca67952efda4df/EdColorPicker.js/buggy/editor/ui/dialogs/content/EdColorPicker.js