www

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

commit 62aa5acc0d8c5e90f7a9f2794347961c7255ac2e
parent aeada8032caf0d42db31cd849b3173d3fea34fd1
Author: Dan Stillman <dstillman@zotero.org>
Date:   Tue, 10 Feb 2015 22:34:11 -0500

Fix NO_INTERFACE console error after itembox/tagsbox edit in Fx36

In Fx36+, QIing the scrollbox to nsIScrollBoxObject throws NO_INTERFACE,
presumably because https://bugzilla.mozilla.org/show_bug.cgi?id=364612
was implemented in some other ticket.

Diffstat:
Mchrome/content/zotero/bindings/itembox.xml | 4+++-
Mchrome/content/zotero/bindings/tagsbox.xml | 7++++---
2 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/chrome/content/zotero/bindings/itembox.xml b/chrome/content/zotero/bindings/itembox.xml @@ -1027,7 +1027,9 @@ <body> <![CDATA[ var sbo = document.getAnonymousNodes(this)[0].boxObject; - sbo.QueryInterface(Components.interfaces.nsIScrollBoxObject); + if (Zotero.platformMajorVersion < 36) { + sbo.QueryInterface(Components.interfaces.nsIScrollBoxObject); + } sbo.ensureElementIsVisible(elem); ]]> </body> diff --git a/chrome/content/zotero/bindings/tagsbox.xml b/chrome/content/zotero/bindings/tagsbox.xml @@ -1033,9 +1033,10 @@ <parameter name="elem"/> <body> <![CDATA[ - var scrollbox = document.getAnonymousNodes(this)[0]; - var sbo = scrollbox.boxObject; - sbo.QueryInterface(Components.interfaces.nsIScrollBoxObject); + var sbo = document.getAnonymousNodes(this)[0].boxObject; + if (Zotero.platformMajorVersion < 36) { + sbo.QueryInterface(Components.interfaces.nsIScrollBoxObject); + } sbo.ensureElementIsVisible(elem); ]]> </body>