Use nsIWindowWatcher in Zotero.openInViewer()
Instead of getting the last browser window
This commit is contained in:
parent
991967d5bc
commit
ee0b4f5d0d
|
@ -1054,9 +1054,13 @@ Services.scriptloader.loadSubScript("resource://zotero/polyfill.js");
|
||||||
if (win) {
|
if (win) {
|
||||||
win.loadURI(uri);
|
win.loadURI(uri);
|
||||||
} else {
|
} else {
|
||||||
let window = wm.getMostRecentWindow("navigator:browser");
|
let ww = Components.classes['@mozilla.org/embedcomp/window-watcher;1']
|
||||||
win = window.openDialog("chrome://zotero/content/standalone/basicViewer.xul",
|
.getService(Components.interfaces.nsIWindowWatcher);
|
||||||
"basicViewer", "chrome,resizable,centerscreen,menubar,scrollbars", uri);
|
let arg = Components.classes["@mozilla.org/supports-string;1"]
|
||||||
|
.createInstance(Components.interfaces.nsISupportsString);
|
||||||
|
arg.data = uri;
|
||||||
|
win = ww.openWindow(null, "chrome://zotero/content/standalone/basicViewer.xul",
|
||||||
|
"basicViewer", "chrome,dialog=yes,resizable,centerscreen,menubar,scrollbars", arg);
|
||||||
}
|
}
|
||||||
if (onLoad) {
|
if (onLoad) {
|
||||||
let browser
|
let browser
|
||||||
|
|
Loading…
Reference in New Issue
Block a user