From 0433a7b0ee06095512df276aad59b14240581773 Mon Sep 17 00:00:00 2001 From: "Davide P. Cervone" Date: Wed, 28 Jan 2015 14:46:15 -0500 Subject: [PATCH] Some fixes to get things to work in older IE versions. --- unpacked/extensions/CHTML-preview.js | 2 +- unpacked/jax/output/HTML-CSS/jax.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/unpacked/extensions/CHTML-preview.js b/unpacked/extensions/CHTML-preview.js index 7f008647b..86704ae9d 100644 --- a/unpacked/extensions/CHTML-preview.js +++ b/unpacked/extensions/CHTML-preview.js @@ -51,7 +51,7 @@ Config: function () { HUB.Config({ "HTML-CSS": this.config.Chunks, - SVG: this.config.Chunks, + SVG: this.config.Chunks }); MathJax.Ajax.Styles({".MathJax_Preview .MJXc-math":{color:this.config.color}}); var update, delay, style, done, saved; diff --git a/unpacked/jax/output/HTML-CSS/jax.js b/unpacked/jax/output/HTML-CSS/jax.js index 95a5c3839..45e9d4e62 100644 --- a/unpacked/jax/output/HTML-CSS/jax.js +++ b/unpacked/jax/output/HTML-CSS/jax.js @@ -2109,7 +2109,7 @@ HTMLCSS.addElement(span,"span",{style:{"font-size":scale}},[text]); if (variant.bold) {span.lastChild.style.fontWeight = "bold"} if (variant.italic) {span.lastChild.style.fontStyle = "italic"} - delete span.bbox; + span.bbox = null; var HD = HTMLCSS.getHD(span), W = HTMLCSS.getW(span); span.bbox = {h:HD.h, d:HD.d, w:W, lw:0, rw:W, exactW: true}; } else { @@ -2850,7 +2850,7 @@ // Add the width to the span (outside the MathJax class, so uses outer em size, // which makes it work even when minimum font size is in effect). // - span.style.width = HTMLCSS.Em((Math.round(math.bbox.w*this.em)+.25)/HTMLCSS.outerEm); + span.style.width = HTMLCSS.Em(Math.max(0,Math.round(math.bbox.w*this.em)+.25)/HTMLCSS.outerEm); span.style.display = "inline-block"; // // Adjust bbox to match outer em-size