diff --git a/chrome/content/zotero/integration/quickFormat.js b/chrome/content/zotero/integration/quickFormat.js index 3206db38f..ca3725154 100644 --- a/chrome/content/zotero/integration/quickFormat.js +++ b/chrome/content/zotero/integration/quickFormat.js @@ -24,6 +24,7 @@ */ var Zotero_QuickFormat = new function () { + const pixelRe = /^([0-9]+)px$/ var initialized, io, qfs, qfi, qfiWindow, qfiDocument, qfe, qfb, qfbHeight, keepSorted, showEditor, referencePanel, referenceBox, referenceHeight = 0, separatorHeight = 0, currentLocator, currentLocatorLabel, currentSearchTime, dragging, panel, @@ -741,15 +742,19 @@ var Zotero_QuickFormat = new function () { } if(!panelFrameHeight) { - if(Zotero.isWin || Zotero.isMac) { - panelFrameHeight = 1; - } else { - panelFrameHeight = referencePanel.boxObject.height - referencePanel.clientHeight; + panelFrameHeight = referencePanel.boxObject.height - referencePanel.clientHeight; + var computedStyle = window.getComputedStyle(referenceBox, null); + for each(var attr in ["border-top-width", "border-bottom-width"]) { + var val = computedStyle.getPropertyValue(attr); + if(val) { + var m = pixelRe.exec(val); + if(m) panelFrameHeight += parseInt(m[1], 10); + } } } referencePanel.sizeTo(window.outerWidth-30, - numReferences*referenceHeight+numSeparators*separatorHeight+2*panelFrameHeight); + numReferences*referenceHeight+numSeparators*separatorHeight+panelFrameHeight); if(!panelShowing) _openReferencePanel(); } else if(panelShowing) { referencePanel.hidePopup();