fx-compat: .boxObject was removed in Fx69

https://bugzilla.mozilla.org/show_bug.cgi?id=1519948
This commit is contained in:
Dan Stillman 2021-07-29 03:22:58 -04:00
parent 0717612b4b
commit 26c4bea4fd

View file

@ -5429,11 +5429,12 @@ var ZoteroPane = new function()
var itemToolbar = document.getElementById("zotero-item-toolbar"); var itemToolbar = document.getElementById("zotero-item-toolbar");
var tagSelector = document.getElementById("zotero-tag-selector"); var tagSelector = document.getElementById("zotero-tag-selector");
collectionsToolbar.style.width = collectionsPane.boxObject.width + 'px'; var collectionsPaneWidth = collectionsPane.getBoundingClientRect().width;
tagSelector.style.maxWidth = collectionsPane.boxObject.width + 'px'; collectionsToolbar.style.width = collectionsPaneWidth + 'px';
tagSelector.style.maxWidth = collectionsPaneWidth + 'px';
if (collectionsTree) { if (collectionsTree) {
let borderSize = Zotero.isMac ? 0 : 2; let borderSize = Zotero.isMac ? 0 : 2;
collectionsTree.style.maxWidth = (collectionsPane.boxObject.width - borderSize) + 'px'; collectionsTree.style.maxWidth = (collectionsPaneWidth - borderSize) + 'px';
} }
if (ZoteroPane.itemsView) { if (ZoteroPane.itemsView) {
ZoteroPane.itemsView.updateHeight(); ZoteroPane.itemsView.updateHeight();
@ -5444,10 +5445,10 @@ var ZoteroPane = new function()
itemsToolbar.setAttribute("flex", "1"); itemsToolbar.setAttribute("flex", "1");
itemToolbar.setAttribute("flex", "0"); itemToolbar.setAttribute("flex", "0");
} else { } else {
var itemsToolbarWidth = itemsPane.boxObject.width; var itemsToolbarWidth = itemsPane.getBoundingClientRect().width;
if (collectionsPane.collapsed) { if (collectionsPane.collapsed) {
itemsToolbarWidth -= collectionsToolbar.boxObject.width; itemsToolbarWidth -= collectionsToolbar.getBoundingClientRect().width;
} }
// Not sure why this is necessary, but it keeps the search bar from overflowing into the // Not sure why this is necessary, but it keeps the search bar from overflowing into the
// right-hand pane // right-hand pane