www

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

commit 79ed7e503ef70671d8979f8150b60022f3a3c54f
parent a09ff9c9ec036cf5783cd11cf4a371e14f6cd909
Author: Simon Kornblith <simon@simonster.com>
Date:   Mon,  1 Sep 2014 19:29:45 -0400

Fix MODS under Fx 32

Diffstat:
Mchrome/content/zotero/xpcom/utilities.js | 11++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/chrome/content/zotero/xpcom/utilities.js b/chrome/content/zotero/xpcom/utilities.js @@ -1043,11 +1043,20 @@ Zotero.Utilities = { var results = []; for(var i=0, n=elements.length; i<n; i++) { - var element = elements[i]; + // For some reason, if elements is wrapped by an object + // Xray, we won't be able to unwrap the DOMWrapper around + // the element. So waive the object Xray. + var element = elements.wrappedJSObject ? elements.wrappedJSObject[i] : elements[i]; // Firefox 5 hack, so we will preserve Fx5DOMWrappers var isWrapped = Zotero.Translate.DOMWrapper && Zotero.Translate.DOMWrapper.isWrapped(element); if(isWrapped) element = Zotero.Translate.DOMWrapper.unwrap(element); + + // We waived the object Xray above, which will waive the + // DOM Xray, so make sure we have a DOM Xray wrapper. + if(Zotero.isFx) { + element = new XPCNativeWrapper(element); + } if(element.ownerDocument) { var rootDoc = element.ownerDocument;