rem: while (!htmlEditor.NodeIsBlock(element)) 
add: while (!gEditor.NodeIsBlock(element)) 
context: function GetBackgroundElementWithColor(){  gColorObj.Type = "";  gColorObj.PageColor = "";  gColorObj.TableColor = "";  gColorObj.CellColor = "";  gColorObj.BackgroundColor = "";  var tagNameObj = new Object;  var countObj = new Object;  var tableEd = gEditor.QueryInterface(Components.interfaces.nsITableEditor);  var element;  if (tableEd)    tableEd.getSelectedOrParentTableElement(element, tagNameObj, countObj);  if (element && tagNameObj && tagNameObj.value)  {    gColorObj.BackgroundColor = GetHTMLOrCSSStyleValue(element, "bgcolor", "background-color");    gColorObj.BackgroundColor = ConvertRGBColorIntoHEXColor(gColorObj.BackgroundColor);    if (tagNameObj.value.toLowerCase() == "td")    {      gColorObj.Type = "Cell";      gColorObj.CellColor = gColorObj.BackgroundColor;      // Get any color that might be on parent table      var table = GetParentTable(element);      gColorObj.TableColor = GetHTMLOrCSSStyleValue(table, "bgcolor", "background-color");      gColorObj.TableColor = ConvertRGBColorIntoHEXColor(gColorObj.TableColor);    }    else    {      gColorObj.Type = "Table";      gColorObj.TableColor = gColorObj.BackgroundColor;    }  }  else  {    var prefs = GetPrefs();    var IsCSSPrefChecked = prefs.getBoolPref("editor.use_css");    var htmlEditor = gEditor.QueryInterface(Components.interfaces.nsIHTMLEditor);    if (IsCSSPrefChecked && htmlEditor)    {      var selection = gEditor.selection;      if (selection)      {        element = selection.focusNode;        while (!htmlEditor.NodeIsBlock(element))          element = element.parentNode;      }      else      {        element = GetBodyElement();      }    }    else    {      element = GetBodyElement();    }    if (element)    {      gColorObj.Type = "Page";      gColorObj.BackgroundColor = GetHTMLOrCSSStyleValue(element, "bgcolor", "background-color");      if (gColorObj.BackgroundColor == "")      {        gColorObj.BackgroundColor = "transparent";      }      else      {        gColorObj.BackgroundColor = ConvertRGBColorIntoHEXColor(gColorObj.BackgroundColor);      }      gColorObj.PageColor = gColorObj.BackgroundColor;    }  }  return element;}
meta: 10234	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/10234/160100a09b4b930d5b308fda04a1e21843697414/editor.js/buggy/editor/ui/composer/content/editor.js