diff --git a/browser/components/bookmarks/content/addBookmark2.js b/browser/components/bookmarks/content/addBookmark2.js index 8b7290964052..9c92fde1c776 100644 --- a/browser/components/bookmarks/content/addBookmark2.js +++ b/browser/components/bookmarks/content/addBookmark2.js @@ -91,6 +91,20 @@ function Startup() gName.focus(); onFieldInput(); gSelectedFolder = RDF.GetResource(gMenulist.selectedItem.id); + + // fix no more persisted class attribute in old profiles + var localStore = RDF.GetDataSource("rdf:local-store"); + var rAttribute = RDF.GetResource("class"); + var rElement = RDF.GetResource("chrome://browser/content/bookmarks/addBookmark2.xul#expander"); + var rDialog = RDF.GetResource("chrome://browser/content/bookmarks/addBookmark2.xul"); + var rPersist = RDF.GetResource(NC_NS+"persist"); + + var rOldValue = localStore.GetTarget(rElement, rAttribute, true); + if (rOldValue) { + localStore.Unassert(rElement, rAttribute, rOldValue, true); + localStore.Unassert(rDialog, rPersist, rElement, true); + document.getElementById("expander").setAttribute("class", "down"); + } } function onFieldInput()