If the desktop viewer component was hidden, for example after collapsing the sidebar, the next time it was shown the viewer would be blank. This PR fixes that.