diff --git a/chrome/content/zotero/preferences/preferences.js b/chrome/content/zotero/preferences/preferences.js index 3d2c700ba..547fc190e 100644 --- a/chrome/content/zotero/preferences/preferences.js +++ b/chrome/content/zotero/preferences/preferences.js @@ -62,6 +62,7 @@ function init() if(window.arguments) { _io = window.arguments[0]; + if(_io.wrappedJSObject) _io = _io.wrappedJSObject; if(_io.pane) { var pane = document.getElementById(_io.pane); diff --git a/components/zotero-protocol-handler.js b/components/zotero-protocol-handler.js index 253753b0a..f7b008fab 100644 --- a/components/zotero-protocol-handler.js +++ b/components/zotero-protocol-handler.js @@ -1062,8 +1062,9 @@ function ChromeExtensionHandler() { if(s.length == 2) { data.pane = s[1]; } + data.wrappedJSObject = data; - if(Zotero.isFx4) { + if(Zotero.isFx4 || !Zotero.isMac) { var win = Components.classes["@mozilla.org/appshell/window-mediator;1"] .getService(Components.interfaces.nsIWindowMediator) .getMostRecentWindow("navigator:browser");