rem: var deckIndex = 0; 
add:   var deckIndex = gDialog.AddHTMLAttributeValueDeck.getAttribute("index"); 
context: function onInputHTMLAttributeName(){  var attName = TrimString(gDialog.AddHTMLAttributeNameInput.value).toLowerCase();  // Clear value widget, but prevent triggering update in tree  gUpdateTreeValue = false;  gDialog.AddHTMLAttributeValueInput.value = "";  gUpdateTreeValue = true;   if (attName)  {    // Get value list for current attribute name    var valueListName;    // Most elements have the "dir" attribute,    //   so we have just one array for the allowed values instead    //   requiring duplicate entries for each element in EdAEAttributes.js    if (attName == "dir")      valueListName = "all_dir";    else      valueListName = gElement.localName.toLowerCase() + "_" + attName;    // Strip off leading "_" we sometimes use (when element name is reserved word)    if (valueListName[0] == "_")      valueListName = valueListName.slice(1);    var newValue = "";    var listLen = 0;    var deckIndex = 0;    if (valueListName in gHTMLAttr)    {      var valueList = gHTMLAttr[valueListName];      // Index to which widget we were using to edit the value      deckIndex = gDialog.AddHTMLAttributeValueDeck.getAttribute("index");      listLen = valueList.length;      if (listLen > 0)        newValue = valueList[0];      // Note: For case where "value list" is actually just       // one (default) item, don't use menulist for that      if (listLen > 1)      {        ClearMenulist(gDialog.AddHTMLAttributeValueMenulist);        if (deckIndex != "1")        {          // Switch to using editable menulist          gDialog.AddHTMLAttributeValueInput = gDialog.AddHTMLAttributeValueMenulist;          gDialog.AddHTMLAttributeValueDeck.setAttribute("index", "1");        }        // Rebuild the list        for (var i = 0; i < listLen; i++)        {          if (valueList[i] == "-")          {            // Signal for separator            var popup = gDialog.AddHTMLAttributeValueInput.firstChild;            if (popup)            {              var sep = document.createElementNS("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul", "menuseparator");              if (sep)                popup.appendChild(sep);            }                  } else {            AppendStringToMenulist(gDialog.AddHTMLAttributeValueMenulist, valueList[i]);          }        }      }    }        if (listLen <= 1 && deckIndex != "0")    {      // No list: Use textbox for input instead      gDialog.AddHTMLAttributeValueInput = gDialog.AddHTMLAttributeValueTextbox;      gDialog.AddHTMLAttributeValueDeck.setAttribute("index", "0");    }    // If attribute already exists in tree, use associated value,    //  else use default found above    var existingValue = GetAndSelectExistingAttributeValue(attName, "HTMLAList");    if (existingValue)      newValue = existingValue;          gDialog.AddHTMLAttributeValueInput.value = newValue;  }}
meta: 8395	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/8395/97a673d53162cd06b1415b99a15f58f3217d7236/EdAEHTMLAttributes.js/buggy/editor/ui/dialogs/content/EdAEHTMLAttributes.js