rem: spring.setAttribute("height", currentRow.boxObject.height); 
add: try { spring.setAttribute("height", currentRow.boxObject.height); } catch(ex) { } 
context:   onDrop: function (aEvent, aXferData, aDragSession)  {    var newButtonId = aXferData.data;    if (gCurrentDragOverItem.firstChild.id == newButtonId)      return;    var toolbar = document.getElementById("cloneToolbar");    var item = null;    if (gDraggingFromPalette) {      var palette = document.getElementById("palette-box");      var paletteItems = palette.getElementsByTagName("toolbarpaletteitem");      var paletteItem;      for (var i = 0; i < paletteItems.length; ++i) {        paletteItem = paletteItems[i];        if (paletteItem.firstChild.id == newButtonId) {          item = paletteItem;          break;        }      }    }    else {      // If drag-rearranging within the toolbar, we want to move it to      // the new location, so remove it here and we'll add it in the correct spot further down.      var toolbarItem = toolbar.firstChild;      while (toolbarItem) {        if (toolbarItem.firstChild.id == newButtonId) {          item = toolbarItem;          break;        }        toolbarItem = toolbarItem.nextSibling;      }    }           if (!item)      return;    // If we're a separator and dragging from the palette, do a clone so that the    // separator always stays in the palette.    var isSeparator = false;    if (gDraggingFromPalette && item.firstChild.localName == "toolbarseparator") {      item = item.cloneNode(true);      isSeparator = true;    }    // We have to remove the funky flex and width attributes that were set on    // the item to space it properly in the palette.    item.removeAttribute("flex");    item.removeAttribute("width");    item.removeAttribute("minwidth");    item.removeAttribute("minheight");    item.removeAttribute("align");    item.removeAttribute("pack");        // Set whatever flex the item in our enclosure has on the enclosure,    // so that we flex properly.    if (item.firstChild.getAttribute("flex"))      item.setAttribute("flex", item.firstChild.getAttribute("flex"));    item.setAttribute("ondraggesture", "gDraggingFromPalette = false; nsDragAndDrop.startDrag(event, dragObserver);");     var currentRow;    if (gDraggingFromPalette && !isSeparator)      currentRow = item.parentNode;    if (gCurrentDragOverItem.id == "cloneToolbar")      toolbar.appendChild(item);    else      toolbar.insertBefore(item, gCurrentDragOverItem);    gCurrentDragOverItem.removeAttribute("dragactive");    gCurrentDragOverItem = null;    gToolbarChanged = true;    while (currentRow) {      // Pull the first child of the next row up      // into this row.      var nextRow = currentRow.nextSibling;            if (!nextRow) {        var last = currentRow.lastChild;        var first = currentRow.firstChild;        if (first == last) {          // Kill the row.          currentRow.parentNode.removeChild(currentRow);          return;        }        if (last.localName == "spacer") {          var flex = last.getAttribute("flex");          flex++;          last.setAttribute("flex", flex);          // Reflow doesn't happen for some reason.  Trigger it with a hide/show. ICK! -dwh          last.hidden = true;          last.hidden = false;          return;        }        else {          // Make a spacer and give it a flex of 1.          var spring = document.createElementNS("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul",                                            "spacer");          spring.setAttribute("flex", "1");          spring.setAttribute("height", currentRow.boxObject.height);          currentRow.appendChild(spring);        }        return;      }            currentRow.appendChild(nextRow.firstChild);      currentRow = currentRow.nextSibling;    }  },
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/d0b7503ac2a95b7eaabccb61b7a648fb18159bdb/customizeToolbar.js/clean/browser/base/content/customizeToolbar.js