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.)
This commit is contained in:
parent
a22fe2ecda
commit
488c4eb72b
1 changed files with 7 additions and 0 deletions
|
@ -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',
|
||||
|
|
Loading…
Reference in a new issue