diff --git a/chrome/content/zotero/standalone/standalone.js b/chrome/content/zotero/standalone/standalone.js
index dd47ac7ff4..d83b7c3b5d 100644
--- a/chrome/content/zotero/standalone/standalone.js
+++ b/chrome/content/zotero/standalone/standalone.js
@@ -739,7 +739,8 @@ const ZoteroStandalone = new function() {
* Checks for updates
*/
this.checkForUpdates = function() {
- window.open('chrome://zotero/content/update/updates.xhtml', 'updateChecker', 'chrome,centerscreen');
+ Zotero.debug('ZoteroStandalone.checkForUpdates is deprecated -- use Zotero.openCheckForUpdatesWindow() instead');
+ Zotero.openCheckForUpdatesWindow();
}
/**
diff --git a/chrome/content/zotero/xpcom/sync/syncRunner.js b/chrome/content/zotero/xpcom/sync/syncRunner.js
index f5b3e0cebd..b695b5bc11 100644
--- a/chrome/content/zotero/xpcom/sync/syncRunner.js
+++ b/chrome/content/zotero/xpcom/sync/syncRunner.js
@@ -1337,7 +1337,7 @@ Zotero.Sync.Runner_Module = function (options = {}) {
e.errorType = 'warning';
e.dialogButtonText = Zotero.getString('general.checkForUpdates');
e.dialogButtonCallback = () => {
- Zotero.openCheckForUpdatesWindow();
+ Zotero.openCheckForUpdatesWindow({ modal: true });
};
e.dialogButton2Text = Zotero.getString('general.moreInformation');
e.dialogButton2Callback = () => {
diff --git a/chrome/content/zotero/xpcom/zotero.js b/chrome/content/zotero/xpcom/zotero.js
index 358db54a8d..c06a135899 100644
--- a/chrome/content/zotero/xpcom/zotero.js
+++ b/chrome/content/zotero/xpcom/zotero.js
@@ -649,7 +649,7 @@ Services.scriptloader.loadSubScript("resource://zotero/polyfill.js");
// "Check for Update" button
if (index === 0) {
- Zotero.openCheckForUpdatesWindow();
+ Zotero.openCheckForUpdatesWindow({ modal: true });
}
// Load More Info page
else if (index == 2) {
@@ -973,9 +973,19 @@ Services.scriptloader.loadSubScript("resource://zotero/polyfill.js");
}
- this.openCheckForUpdatesWindow = function () {
- Services.ww.openWindow(null, 'chrome://zotero/content/update/updates.xhtml',
- 'updateChecker', 'chrome,centerscreen,modal', null);
+ this.openCheckForUpdatesWindow = function ({ modal } = {}) {
+ let win = Services.wm.getMostRecentWindow('Update:Wizard');
+ if (win) {
+ win.focus();
+ }
+ else {
+ let flags = 'chrome,centerscreen';
+ if (modal) {
+ flags += ',modal';
+ }
+ Services.ww.openWindow(null, 'chrome://zotero/content/update/updates.xhtml',
+ 'updateChecker', flags, null);
+ }
};
diff --git a/chrome/content/zotero/zoteroPane.xhtml b/chrome/content/zotero/zoteroPane.xhtml
index 88fe29685f..e7970d5e0c 100644
--- a/chrome/content/zotero/zoteroPane.xhtml
+++ b/chrome/content/zotero/zoteroPane.xhtml
@@ -772,7 +772,7 @@
+ oncommand="Zotero.openCheckForUpdatesWindow();"/>