From e10c3e2e72237fb9bfba00943fdbb3ab6966f5f6 Mon Sep 17 00:00:00 2001 From: Simon Kornblith Date: Tue, 31 Jan 2012 10:58:09 -0500 Subject: [PATCH] Fix switching to classic add citation dialog --- chrome/content/zotero/integration/quickFormat.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/chrome/content/zotero/integration/quickFormat.js b/chrome/content/zotero/integration/quickFormat.js index 3bf9e9a3a..1dfb33ee8 100644 --- a/chrome/content/zotero/integration/quickFormat.js +++ b/chrome/content/zotero/integration/quickFormat.js @@ -1157,7 +1157,11 @@ var Zotero_QuickFormat = new function () { .getService(Components.interfaces.nsIWindowWatcher) .openWindow(null, 'chrome://zotero/content/integration/addCitationDialog.xul', '', 'chrome,centerscreen,resizable', io); - newWindow.addEventListener("load", function() { window.close(); }, false); + newWindow.addEventListener("focus", function() { + newWindow.removeEventListener("focus", arguments.callee, true); + window.close(); + }, true); + accepted = true; } /**