From 5913c535093ed30cbb172fa92cd0b3aa6964f6a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adomas=20Ven=C4=8Dkauskas?= Date: Mon, 14 Oct 2019 13:06:17 +0300 Subject: [PATCH] Proper fix to citation dialog artefacting on macOS. Closes #1720 --- chrome/content/zotero/integration/quickFormat.js | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/chrome/content/zotero/integration/quickFormat.js b/chrome/content/zotero/integration/quickFormat.js index 474868b88f..98d22bdb54 100644 --- a/chrome/content/zotero/integration/quickFormat.js +++ b/chrome/content/zotero/integration/quickFormat.js @@ -81,7 +81,6 @@ var Zotero_QuickFormat = new function () { // as titlebar+maincontent, so we have hack around that here. if (Zotero.isMac && Zotero.platformMajorVersion >= 60) { qfb.style.marginBottom = "-22px"; - referencePanel.style.marginTop = "22px"; } // add labels to popup @@ -811,11 +810,21 @@ var Zotero_QuickFormat = new function () { qfs.setAttribute("multiline", true); qfs.style.height = ((Zotero.isMac ? 6 : 4)+qfe.scrollHeight)+"px"; window.sizeToContent(); + // the above line causes drawing artifacts to appear due to a bug with drawintitle property + // in fx60. this fixes the artifacting + if (Zotero.isMac && Zotero.platformMajorVersion >= 60) { + document.children[0].setAttribute('drawintitlebar', 'false'); + document.children[0].setAttribute('drawintitlebar', 'true'); + } } else { delete qfs.style.height; qfe.removeAttribute("multiline"); qfs.removeAttribute("multiline"); window.sizeToContent(); + if (Zotero.isMac && Zotero.platformMajorVersion >= 60) { + document.children[0].setAttribute('drawintitlebar', 'false'); + document.children[0].setAttribute('drawintitlebar', 'true'); + } } var panelShowing = referencePanel.state === "open" || referencePanel.state === "showing";