diff --git a/chrome/content/zotero/xpcom/translation/translate.js b/chrome/content/zotero/xpcom/translation/translate.js index 06d4791b2..634fce39f 100644 --- a/chrome/content/zotero/xpcom/translation/translate.js +++ b/chrome/content/zotero/xpcom/translation/translate.js @@ -1584,7 +1584,9 @@ Zotero.Translate.Web.prototype._getTranslatorsGetPotentialTranslators = function Zotero.Translate.Web.prototype._getSandboxLocation = function() { if(this._parentTranslator) { return this._parentTranslator._sandboxLocation; - } else if(this.document.defaultView && this.document.defaultView.toString() === "[object Window]") { + } else if(this.document.defaultView + && (this.document.defaultView.toString().indexOf("Window") !== -1 + || this.document.defaultView.toString().indexOf("XrayWrapper") !== -1)) { return this.document.defaultView; } else { return this.document.location.toString();