Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Zutilo disabled after re-open the Zotero window #229

Open
albert-ying opened this issue Jul 1, 2022 · 2 comments
Open

[BUG] Zutilo disabled after re-open the Zotero window #229

albert-ying opened this issue Jul 1, 2022 · 2 comments

Comments

@albert-ying
Copy link

Replication steps:

  1. Open Zotero
  2. Use command+w to close the Zotero window (note that the Zotero is still working at the background)
  3. Reopen the Zotero by clicking the App icon
  4. The Zutilo shortcuts don't work in the re-opened window.

System: MacOS 12.4 M1

@qqobb
Copy link
Collaborator

qqobb commented Jul 11, 2022

This is an issue specific to Mac systems. It should be related to zotero/zotero#1952 and jlegewie/zotfile#595.

If you find a fix, please submit a PR.

@wshanks
Copy link
Owner

wshanks commented Jul 12, 2022

Yes, this is hard for me to test because I don't have easy access to MacOS. On Linux, when you close the window with ctrl+W, the entire application exits (and strangely ctrl+Q doesn't work). Zutilo does try to set up a window listener to load future windows:

onOpenWindow: function(xulWindow) {
var domWindow = xulWindow
.QueryInterface(Components.interfaces.nsIInterfaceRequestor)
.getInterface(Components.interfaces.nsIDOMWindow)
domWindow.addEventListener('load', function listener() {
domWindow.removeEventListener('load', listener, false)
if (domWindow.document.documentElement.
getAttribute('windowtype') == 'navigator:browser') {
Zutilo.loadWindowChrome(domWindow)
}
}, false)
},

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants