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>
|
||||
<![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>
|
||||
|
|
|
@ -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>
|
||||
|
|
Loading…
Reference in a new issue