diff --git a/chrome/content/zotero/xpcom/translation/translate.js b/chrome/content/zotero/xpcom/translation/translate.js index 2928042ae..a0b43450e 100644 --- a/chrome/content/zotero/xpcom/translation/translate.js +++ b/chrome/content/zotero/xpcom/translation/translate.js @@ -450,7 +450,7 @@ Zotero.Translate.Sandbox = { */ "selectItems":function(translate, items, callback) { function transferObject(obj) { - return Zotero.isFx ? translate._sandboxManager.copyObject(obj) : obj; + return Zotero.isFx && !Zotero.isBookmarklet ? translate._sandboxManager.copyObject(obj) : obj; } if(Zotero.Utilities.isEmpty(items)) { @@ -499,6 +499,10 @@ Zotero.Translate.Sandbox = { }; } + if(Zotero.isFx && !Zotero.isBookmarklet) { + items = Components.utils.cloneInto(items, {}); + } + var returnValue = translate._runHandler("select", items, newCallback); if(returnValue !== undefined) { // handler may have returned a value, which makes callback unnecessary