Proper fix to citation dialog artefacting on macOS. Closes #1720

This commit is contained in:
Adomas Venčkauskas 2019-10-14 13:06:17 +03:00
parent 371cef4035
commit 5913c53509

View file

@ -81,7 +81,6 @@ var Zotero_QuickFormat = new function () {
// as titlebar+maincontent, so we have hack around that here. // as titlebar+maincontent, so we have hack around that here.
if (Zotero.isMac && Zotero.platformMajorVersion >= 60) { if (Zotero.isMac && Zotero.platformMajorVersion >= 60) {
qfb.style.marginBottom = "-22px"; qfb.style.marginBottom = "-22px";
referencePanel.style.marginTop = "22px";
} }
// add labels to popup // add labels to popup
@ -811,11 +810,21 @@ var Zotero_QuickFormat = new function () {
qfs.setAttribute("multiline", true); qfs.setAttribute("multiline", true);
qfs.style.height = ((Zotero.isMac ? 6 : 4)+qfe.scrollHeight)+"px"; qfs.style.height = ((Zotero.isMac ? 6 : 4)+qfe.scrollHeight)+"px";
window.sizeToContent(); 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 { } else {
delete qfs.style.height; delete qfs.style.height;
qfe.removeAttribute("multiline"); qfe.removeAttribute("multiline");
qfs.removeAttribute("multiline"); qfs.removeAttribute("multiline");
window.sizeToContent(); 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"; var panelShowing = referencePanel.state === "open" || referencePanel.state === "showing";