commit 9eb75e343943c071f20ba30143d9419bf16ef368
parent 96bb436b20a8548001affe030ce8bf55b52ee854
Author: Simon Kornblith <simon@simonster.com>
Date: Mon, 16 Apr 2012 00:48:23 -0400
Fix IE and Safari support
Diffstat:
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
@@ -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
@@ -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<n; i++) {
var item = items[i];