diff --git a/browser/components/places/content/toolbar.xml b/browser/components/places/content/toolbar.xml index 60797170c29f..4867a39e75b4 100755 --- a/browser/components/places/content/toolbar.xml +++ b/browser/components/places/content/toolbar.xml @@ -449,7 +449,7 @@ if (this._self._result != val) { this._self._containerNodesMap = []; this._self._result = val; - if (val) // this calls _rebuild through invalidateContainer + if (val) // this calls _rebuild through invalidateContainer val.root.containerOpen = true; } return val; diff --git a/toolkit/components/places/src/utils.js b/toolkit/components/places/src/utils.js index 19c723e01afd..976c46842aa0 100644 --- a/toolkit/components/places/src/utils.js +++ b/toolkit/components/places/src/utils.js @@ -1306,14 +1306,17 @@ var PlacesUtils = { // write child nodes if (!aNode.livemark) { asContainer(aSourceNode); - aSourceNode.containerOpen = true; + var wasOpen = aSourceNode.containerOpen; + if (!wasOpen) + aSourceNode.containerOpen = true; var cc = aSourceNode.childCount; for (var i = 0; i < cc; ++i) { if (i != 0) aStream.write(",", 1); serializeNodeToJSONStream(aSourceNode.getChild(i), i); } - aSourceNode.containerOpen = false; + if (!wasOpen) + aSourceNode.containerOpen = false; } // write suffix