diff --git a/reader/panels/container_panel_view.js b/reader/panels/container_panel_view.js index 33a1e530..b98d1467 100644 --- a/reader/panels/container_panel_view.js +++ b/reader/panels/container_panel_view.js @@ -33,12 +33,12 @@ ContainerPanelView.Prototype = function() { this.render = function() { // Hide the whole tab if there is no content - if (this.getContainer().getLength() === 0) { - this.hideToggle(); - this.hide(); - } else { + if (this.getContainer().hasContent(this.config.type)) { this.surface.render(); this.scrollbar.render(); + } else { + this.hideToggle(); + this.hide(); } return this; }; diff --git a/substance/document/container.js b/substance/document/container.js index c139a3c4..8510e9f3 100644 --- a/substance/document/container.js +++ b/substance/document/container.js @@ -136,6 +136,10 @@ Container.Prototype = function() { return this.listView.length; }; + this.hasContent = function(panelType) { + return this.listView.length > 0 || (panelType === 'resource' && this.treeView.length > 0); + }; + // Returns true if there is another node after a given position. // -------- //