From 9eb75e343943c071f20ba30143d9419bf16ef368 Mon Sep 17 00:00:00 2001 From: Simon Kornblith Date: Mon, 16 Apr 2012 00:48:23 -0400 Subject: [PATCH] Fix IE and Safari support --- chrome/content/zotero/xpcom/connector/connector.js | 6 +++++- chrome/content/zotero/xpcom/connector/translate_item.js | 4 +++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/chrome/content/zotero/xpcom/connector/connector.js b/chrome/content/zotero/xpcom/connector/connector.js index 94717d330d..e7c482ed85 100644 --- a/chrome/content/zotero/xpcom/connector/connector.js +++ b/chrome/content/zotero/xpcom/connector/connector.js @@ -68,7 +68,11 @@ Zotero.Connector = new function() { _ieConnectorCallbacks = []; var listener = function(event) { if(event.origin !== "http://127.0.0.1:23119") return; - event.stopPropagation(); + if(event.stopPropagation) { + event.stopPropagation(); + } else { + event.cancelBubble = true; + } // If this is the first time the target was loaded, then this is a loaded // event diff --git a/chrome/content/zotero/xpcom/connector/translate_item.js b/chrome/content/zotero/xpcom/connector/translate_item.js index f1a30476a8..b44c4b1b6d 100644 --- a/chrome/content/zotero/xpcom/connector/translate_item.js +++ b/chrome/content/zotero/xpcom/connector/translate_item.js @@ -105,7 +105,9 @@ Zotero.Translate.ItemSaver.prototype = { "_saveToServer":function(items, callback, attachmentCallback) { var newItems = [], typedArraysSupported = false; try { - typedArraysSupported = new Uint8Array(1); + // Safari <5.2 supports typed arrays, but doesn't support sending them in + // an XHR + typedArraysSupported = new Uint8Array(1) && (!Zotero.isSafari || window.WebKitBlobBuilder); } catch(e) {} for(var i=0, n=items.length; i