www

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | Submodules | README | LICENSE

commit 488c4eb72bd718882b6645b40ae89b59722a36a7
parent a22fe2ecda39540f9f857f676c8f63e05d9e6d4f
Author: Dan Stillman <dstillman@zotero.org>
Date:   Fri,  2 Oct 2015 16:38:33 -0400

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.)

Diffstat:
Mchrome/content/zotero/zoteroPane.js | 7+++++++
1 file changed, 7 insertions(+), 0 deletions(-)

diff --git 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',