Bug 1424672 - stop removing the header in the recently closed places views, r?mak,paolo
MozReview-Commit-ID: J5HlyA8nxe2
--- a/browser/components/places/content/browserPlacesViews.js
+++ b/browser/components/places/content/browserPlacesViews.js
@@ -233,18 +233,23 @@ PlacesViewBase.prototype = {
return this.controller.buildContextMenu(aPopup);
},
destroyContextMenu: function PVB_destroyContextMenu(aPopup) {
this._contextMenuShown = null;
},
clearAllContents(aPopup) {
- while (aPopup.firstChild) {
- aPopup.firstChild.remove();
+ let kid = aPopup.firstChild;
+ while (kid) {
+ let next = kid.nextSibling;
+ if (!kid.classList.contains("panel-header")) {
+ kid.remove();
+ }
+ kid = next;
}
aPopup._emptyMenuitem = aPopup._startMarker = aPopup._endMarker = null;
},
_cleanPopup: function PVB_cleanPopup(aPopup, aDelay) {
// Ensure markers are here when `invalidateContainer` is called before the
// popup is shown, which may the case for panelviews, for example.
this._ensureMarkers(aPopup);