diff --git a/chrome/content/zotero/xpcom/file.js b/chrome/content/zotero/xpcom/file.js index 170a8aa43..327ac38bf 100644 --- a/chrome/content/zotero/xpcom/file.js +++ b/chrome/content/zotero/xpcom/file.js @@ -240,9 +240,6 @@ Zotero.File = new function(){ .getURLSpecFromFile(file); this.addCharsetListener(browser, function (charset, args) { - // ignore spurious about:blank loads - if(browser.contentDocument.location.href == "about:blank") return; - callback(charset, args); Zotero.Browser.deleteHiddenBrowser(browser); }, args); @@ -273,6 +270,9 @@ Zotero.File = new function(){ } var onpageshow = function(){ + // ignore spurious about:blank loads + if(browser.contentDocument.location.href == "about:blank") return; + browser.removeEventListener("pageshow", onpageshow, false); var charset = browser.contentDocument.characterSet;