From 488c4eb72bd718882b6645b40ae89b59722a36a7 Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Fri, 2 Oct 2015 16:38:33 -0400 Subject: [PATCH] Fix menubar/titlebar-less Standalone window issue in El Capitan If Standalone is closed in full-screen mode in 10.11, 'sizemode' on the main window is persisted as 'fullscreen'. On reopen, the window doesn't go into full-screen mode, but it still lacks menubar or titlebar. This patch forces the window into 'normal' mode if it was left in 'fullscreen'. (Firefox appears to ignore 'fullscreen' without actually changing the value, but I didn't find the code that handles that.) --- chrome/content/zotero/zoteroPane.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/chrome/content/zotero/zoteroPane.js b/chrome/content/zotero/zoteroPane.js index 8713d189e..a0a18750d 100644 --- a/chrome/content/zotero/zoteroPane.js +++ b/chrome/content/zotero/zoteroPane.js @@ -97,6 +97,13 @@ var ZoteroPane = new function() * Called when the window containing Zotero pane is open */ function init() { + // 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'); + } + // Set "Report Errors..." label via property rather than DTD entity, // since we need to reference it in script elsewhere document.getElementById('zotero-tb-actions-reportErrors').setAttribute('label',