From f3fdb12f8cdbc023e3f045284e986e575f777abb Mon Sep 17 00:00:00 2001 From: "Davide P. Cervone" Date: Wed, 4 Mar 2015 17:03:24 -0500 Subject: [PATCH] Fix accents to work in Safari (also simplifies the structure in this case). --- unpacked/jax/output/CommonHTML/jax.js | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/unpacked/jax/output/CommonHTML/jax.js b/unpacked/jax/output/CommonHTML/jax.js index e0e00bc65..7f4264830 100644 --- a/unpacked/jax/output/CommonHTML/jax.js +++ b/unpacked/jax/output/CommonHTML/jax.js @@ -1115,19 +1115,15 @@ // Put the base and script into a stack // var stack = HTML.Element("mjx-stack"); + stack.appendChild(over); stack.appendChild(base); if (obox.d < 0) { // - // for negative depths, use a table to avoid unwanted baseline space - // FIXME: needs work in Safari. + // For negative depths, set the height and align to top + // in order to avoid extra baseline space // - HTML.addElement(stack,"mjx-block",{},[["mjx-table"]]); - stack.firstChild.firstChild.appendChild(over); - stack.firstChild.firstChild.style.marginBottom = CHTML.Em(obox.d); - over = stack.firstChild; - } else { - stack.appendChild(over); + over.firstChild.style.verticalAlign = "top"; + over.style.height = obox.h+obox.d; } - stack.appendChild(base); // // Determine the spacing //