www

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | Submodules | README | LICENSE

commit 65cb00e26b465b89447177372b09a1b91e40094d
parent 9b5679fa1449d16355f7ee47e6beb30935456b1a
Author: Simon Kornblith <simon@simonster.com>
Date:   Thu, 30 Apr 2009 00:52:48 +0000

FF3.5 fixes for attachment and file operations


Diffstat:
Mchrome/content/zotero/xpcom/attachments.js | 6++++++
Mchrome/content/zotero/xpcom/file.js | 3+++
2 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/chrome/content/zotero/xpcom/attachments.js b/chrome/content/zotero/xpcom/attachments.js @@ -220,6 +220,9 @@ Zotero.Attachments = new function(){ var browser = Zotero.Browser.createHiddenBrowser(); var imported = false; var onpageshow = function() { + // ignore spurious about:blank loads + if(browser.contentDocument.location.href == "about:blank") return; + // pageshow can be triggered multiple times on some pages, // so make sure we only import once // (https://www.zotero.org/trac/ticket/795) @@ -1164,6 +1167,9 @@ Zotero.Attachments = new function(){ var browser = Zotero.Browser.createHiddenBrowser(); var callback = function(charset, args) { + // ignore spurious about:blank loads + if(browser.contentDocument.location.href == "about:blank") return; + var charsetID = Zotero.CharacterSets.getID(charset); if (charsetID) { var disabled = Zotero.Notifier.disable(); diff --git a/chrome/content/zotero/xpcom/file.js b/chrome/content/zotero/xpcom/file.js @@ -240,6 +240,9 @@ 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);