if ((aElement == mRoot.get()) && (tag.get() != nsXULAtoms::menu))
if ((aElement == mRoot.get()) && (tag.get() != nsXULAtoms::menu) && (tag.get() != nsXULAtoms::menulist) && (tag.get() != nsXULAtoms::menubutton))
nsXULTemplateBuilder::IsOpen(nsIContent* aElement){    nsresult rv;    nsCOMPtr<nsIAtom> tag;    rv = aElement->GetTag(*getter_AddRefs(tag));    if (NS_FAILED(rv)) return PR_FALSE;    // Treat the 'root' element as always open, -unless- it's a    // menu/menupopup. We don't need to "fake" these as being open.    if ((aElement == mRoot.get()) && (tag.get() != nsXULAtoms::menu))      return PR_TRUE;    nsAutoString value;    rv = aElement->GetAttribute(kNameSpaceID_None, nsXULAtoms::open, value);    NS_ASSERTION(NS_SUCCEEDED(rv), "unable to get open attribute");    if (NS_FAILED(rv)) return PR_FALSE;    if (rv == NS_CONTENT_ATTR_HAS_VALUE) {        if (value == kTrueStr)            return PR_TRUE;    }        return PR_FALSE;}