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.
This commit is contained in:
parent
aeada8032c
commit
62aa5acc0d
2 changed files with 7 additions and 4 deletions
|
@ -1027,7 +1027,9 @@
|
||||||
<body>
|
<body>
|
||||||
<![CDATA[
|
<![CDATA[
|
||||||
var sbo = document.getAnonymousNodes(this)[0].boxObject;
|
var sbo = document.getAnonymousNodes(this)[0].boxObject;
|
||||||
sbo.QueryInterface(Components.interfaces.nsIScrollBoxObject);
|
if (Zotero.platformMajorVersion < 36) {
|
||||||
|
sbo.QueryInterface(Components.interfaces.nsIScrollBoxObject);
|
||||||
|
}
|
||||||
sbo.ensureElementIsVisible(elem);
|
sbo.ensureElementIsVisible(elem);
|
||||||
]]>
|
]]>
|
||||||
</body>
|
</body>
|
||||||
|
|
|
@ -1033,9 +1033,10 @@
|
||||||
<parameter name="elem"/>
|
<parameter name="elem"/>
|
||||||
<body>
|
<body>
|
||||||
<![CDATA[
|
<![CDATA[
|
||||||
var scrollbox = document.getAnonymousNodes(this)[0];
|
var sbo = document.getAnonymousNodes(this)[0].boxObject;
|
||||||
var sbo = scrollbox.boxObject;
|
if (Zotero.platformMajorVersion < 36) {
|
||||||
sbo.QueryInterface(Components.interfaces.nsIScrollBoxObject);
|
sbo.QueryInterface(Components.interfaces.nsIScrollBoxObject);
|
||||||
|
}
|
||||||
sbo.ensureElementIsVisible(elem);
|
sbo.ensureElementIsVisible(elem);
|
||||||
]]>
|
]]>
|
||||||
</body>
|
</body>
|
||||||
|
|
Loading…
Reference in a new issue