Skip to content

Commit

Permalink
Fix restoring after closing from full-screen mode on macOS
Browse files Browse the repository at this point in the history
  • Loading branch information
dstillman committed Jul 13, 2017
1 parent ea513ed commit 57881ff
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
5 changes: 5 additions & 0 deletions chrome/content/zotero/standalone/standalone.js
Expand Up @@ -33,6 +33,11 @@ const ZoteroStandalone = new function() {
* Run when standalone window first opens
*/
this.onLoad = function() {
// Fix window without menubar/titlebar when Zotero is closed in full-screen mode in OS X 10.11+
if (Zotero.isMac && window.document.documentElement.getAttribute('sizemode') == 'fullscreen') {
window.document.documentElement.setAttribute('sizemode', 'normal');
}

Zotero.Promise.try(function () {
if(!Zotero) {
throw true;
Expand Down
7 changes: 0 additions & 7 deletions chrome/content/zotero/zoteroPane.js
Expand Up @@ -73,13 +73,6 @@ var ZoteroPane = new function()
this.init = function () {
Zotero.debug("Initializing Zotero pane");

// Fix window without menubar/titlebar when Standalone is closed in full-screen mode
// in OS X 10.11
if (Zotero.isMac && Zotero.isStandalone
&& window.document.documentElement.getAttribute('sizemode') == 'fullscreen') {
window.document.documentElement.setAttribute('sizemode', 'normal');
}

// For now, keep actions menu in the DOM and show it in Firefox for development
if (!Zotero.isStandalone) {
document.getElementById('zotero-tb-actions-menu-separator').hidden = false;
Expand Down

0 comments on commit 57881ff

Please sign in to comment.