diff --git a/chrome/content/zotero/overlay.js b/chrome/content/zotero/overlay.js index 10d99bbb6..cb3c31e13 100644 --- a/chrome/content/zotero/overlay.js +++ b/chrome/content/zotero/overlay.js @@ -90,7 +90,7 @@ var ZoteroPane = new function() const COLLECTIONS_HEIGHT = 125; // minimum height of the collections pane and toolbar var self = this; - var titlebarcolorState, collapseState, titleState; + var titlebarcolorState, toolbarCollapseState, titleState; /* * Called when the window is open @@ -360,6 +360,9 @@ var ZoteroPane = new function() document.getElementById('content').setAttribute('collapsed', false); + // turn off full window mode, if it was on + _setFullWindowMode(false) + // Return focus to the browser content pane window.content.window.focus(); } @@ -390,12 +393,18 @@ var ZoteroPane = new function() document.getElementById('zotero-splitter').setAttribute('hidden', makeFullScreen); fs.setAttribute('fullscreenmode', makeFullScreen); + _setFullWindowMode(makeFullScreen); + } + + /** + * Hides or shows navigation toolbars + * @param set {Boolean} Whether navigation toolbars should be hidden or shown + */ + function _setFullWindowMode(set) { // hide or show navigation toolbars var toolbox = getNavToolbox(); - if(makeFullScreen) { - titleState = document.title; - document.title = "Zotero"; - + Zotero.debug(toolbarCollapseState); + if(set) { // the below would be a good thing to do if the whole title bar (and not just the center // part) got updated when it happened... /*if(Zotero.isMac) { @@ -403,28 +412,33 @@ var ZoteroPane = new function() document.documentElement.removeAttribute("activetitlebarcolor"); }*/ if(Zotero.isMac) document.getElementById("zotero-pane").style.borderTop = "1px solid black"; - - collapseState = [node.collapsed for each (node in toolbox.childNodes)]; - for(var i=0; i