Bug 1423891 - Panel header is gone when going back from Bookmarks to Library. r=Gijs
MozReview-Commit-ID: Bfgg61BH9L8
--- a/browser/components/customizableui/PanelMultiView.jsm
+++ b/browser/components/customizableui/PanelMultiView.jsm
@@ -489,21 +489,24 @@ this.PanelMultiView = class {
this._placeSubView(viewNode);
} else {
throw new Error(`Subview ${aViewId} doesn't exist!`);
}
} else if (viewNode.parentNode == this._panelViewCache) {
this._placeSubView(viewNode);
}
+ let reverse = !!aPreviousView;
+
viewNode.panelMultiView = this.node;
- this._setHeader(viewNode, viewNode.getAttribute("title") ||
- (aAnchor && aAnchor.getAttribute("label")));
+ if (!reverse) {
+ this._setHeader(viewNode, viewNode.getAttribute("title") ||
+ (aAnchor && aAnchor.getAttribute("label")));
+ }
- let reverse = !!aPreviousView;
let previousViewNode = aPreviousView || this._currentSubView;
// If the panelview to show is the same as the previous one, the 'ViewShowing'
// event has already been dispatched. Don't do it twice.
let showingSameView = viewNode == previousViewNode;
let playTransition = (!!previousViewNode && !showingSameView && this._panel.state == "open");
let isMainView = viewNode.id == this._mainViewId;
let dwu = this._dwu;